日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

您可能已經(jīng)注意到具有獨(dú)特滾動條的網(wǎng)站,這些網(wǎng)站賦予它們獨(dú)特的感覺和外觀,因?yàn)樽远x滾動條變得越來越普遍。自定義滾動條可以通過幾種不同的方式簡單地實(shí)現(xiàn)。本文將使用最簡單的方法,即 CSS。

我們使用 CSS 來增強(qiáng)應(yīng)用程序中網(wǎng)頁的視覺吸引力。使用 CSS,我們現(xiàn)在可以更改滾動條的外觀。讓我們看看如何使?jié)L動條自定義箭頭在移動設(shè)備上工作。

使?jié)L動條自定義箭頭在移動設(shè)備上工作

過去,網(wǎng)站上的滾動條可以使用非標(biāo)準(zhǔn) CSS 屬性(如scrollbar-base-color)進(jìn)行修改,您可以將其應(yīng)用于滾動的元素(如 )并做一些非常棒的事情。 IE 放棄了這一點(diǎn)。

自定義滾動條今天再次可用,盡管這次使用了 WebKit。這些屬性現(xiàn)在使用“Shadow DOM”并且?guī)в泄?yīng)商前綴(例如:-webkit-scrollbar)。這已經(jīng)存在了一段時間了。

為了獲得有關(guān)使?jié)L動條自定義箭頭在移動設(shè)備上工作的更多想法,讓我們看看以下示例。

示例

在下面的示例中,我們使用 webkit-scrollbar 使?jié)L動條在移動設(shè)備上工作并將 CSS 應(yīng)用于滾動條。

<!DOCTYPE html>
<html>
   <body>
      <style>
         div{
            max-width:400px;
            max-height:250px;
            overflow-y: scroll;
            overflow-x: hidden;
         }
         div::-webkit-scrollbar {
            width: 0.5em;
         }
         div::-webkit-scrollbar-track {
            -webkit-box-shadow: inset 0 0 2px rgba(1,1,1,0.4);
         }
         div::-webkit-scrollbar-thumb {
            background-color: #D5F5E3;
            outline: 1px solid #FBFCFC;
         }
      </style>
      <div id="tutorial">
         <img src="https://www.tutorialspoint.com/about/images/about-mini-logo.jpg">
         Tutorials Point originated from the idea that there exists a class of readers
         who respond better to online content and prefer to learn new skills at their
         own pace from the comforts of their drawing rooms.The journey commenced with
         a single tutorial on HTML in 2006 and elated by the response it generated, we
         worked our way to adding fresh tutorials to our repository which now proudly
         flaunts a wealth of tutorials and allied articles on topics ranging from programming
         languages to web designing to academics and much more.
      </div>
   </body>
</html>

登錄后復(fù)制

當(dāng)腳本執(zhí)行時,它將生成一個由圖像、一些文本和網(wǎng)頁上可滾動顯示組成的輸出。

示例

考慮以下示例,我們使用 webkit-scrollable 使內(nèi)容在網(wǎng)頁上隨著箭頭滾動。

<!DOCTYPE html>
<html>
   <body>
      <style>
         .visible-scrollbar,
         .mostly-customized-scrollbar {
            display: block;
            width: 300px;
            overflow: auto;
            height: 150px;
         }
         .invisible-scrollbar::-webkit-scrollbar {
            display: none;
         }
         .mostly-customized-scrollbar::-webkit-scrollbar {
            width: 300px;
            height: 8px;
            background-color:#7D3C98 ;
         }
         .mostly-customized-scrollbar::-webkit-scrollbar-thumb {
            outline: 1px solid #FBFCFC;
         }
      </style>
      <div class="visible-scrollbar">
         Mahendra Singh Dhoni born 7 July 1981, commonly known as MS Dhoni,
         is a former Indian cricketer and captain of the Indian national team
         in limited-overs formats from 2007 to 2017, and in Test cricket from
         2008 to 2014. He is also the current captain of Chennai Super Kings in
         the Indian Premier League. Under his captaincy, India won the 2007 ICC
         World Twenty20, the 2011 Cricket World Cup, and the 2013 ICC Champions
         Trophy, the most by any captain. He also led India to victory in the 2010
         and 2016 Asia Cup.
      </div>
   </body>
</html>

登錄后復(fù)制

運(yùn)行上述腳本時,將彈出輸出窗口,顯示文本以及網(wǎng)頁上顯示的可滾動箭頭。

示例

執(zhí)行下面的代碼并觀察我們?nèi)绾问褂?webkit-scrollable 制作自定義滾動。

<!DOCTYPE html>
<html>
   <body>
      <style>
         body {
            font-size: 15pt;
         }
         ::-webkit-scrollbar {
            width: 14px;
            border: 1px solid blue;
         }
         ::-webkit-scrollbar-button:single-button {
            background-color: fuchsia;
            height: 10px;
            width: 10px;
         }
         ::-webkit-scrollbar-thumb {
            background: maroon;
         }
         ::-webkit-scrollbar-track {
            background: silver;
         }
         ::-webkit-resizer {
            background: olive;
         }
      </style>
      <center>
         <img src="https://upload.wikimedia.org/wikipedia/commons/3/3a/Ducatilogol.png">
         <p>Ducati is a group of companies, best known for manufacturing motorcycles
         and headquartered in Borgo Panigale, Bologna, Italy. The group is owned by
         German automotive manufacturer Audi through its Italian subsidiary
         Lamborghini, which is in turn owned by the Volkswagen Group.</p>
         <br>
         <p>In the 1930s and 1940s, Ducati manufactured radios, cameras, and
         electrical products such as razors. Ducati also made a marine binocular called the BIMAR for the Kriegsmarine during World War II, some of which
         were sold on the civilian market after the war.The Ducati Sogno was
         a half-frame Leica-like camera which is now a collector's item.</p>
      </center>
   </body>
</html>

登錄后復(fù)制

執(zhí)行腳本時,它將生成一個由文本、圖像和應(yīng)用 CSS 的自定義滾動條組成的輸出,并顯示在網(wǎng)頁上。

以上就是如何使?jié)L動條自定義箭頭在移動設(shè)備上工作?的詳細(xì)內(nèi)容,更多請關(guān)注www.92cms.cn其它相關(guān)文章!

分享到:
標(biāo)簽:工作 滾動條 箭頭 自定義 設(shè)備
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運(yùn)動步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定