css实现滚动条美化和数字渐变效果代码

代码语言:html

所属分类:加载滚动

代码描述:css实现滚动条美化和数字渐变效果代码

代码标签: 美化 数字 渐变 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<html>

<head>
    <style>
        body {
          padding-top: 300px;
          font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                        Helvetica, Arial, Ubuntu, sans-serif,
                        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
        display: flex;
        justify-content: center;
        color: gray;
        background-color: #000;
          }
        body::-webkit-scrollbar-track
        {
        	border-radius: 10px;
        	background-color: #000;
        }
        
        body::-webkit-scrollbar
        {
        	width: 12px;
        	background-color: #000;
        }
        
        body::-webkit-scrollbar-thumb
        {
        	border-radius: 10px;
        	-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
        	background-color: orangered;
        }
        
        
        /* List */
        ul {
          counter-reset: index;  
          padding: 0;
          max-width: 300px;
        }
        
        /* List element */
        li {
          counter-increment: index; 
          display: flex;
          align-items: center;
          padding: 12px 0;
          box-sizing: border-box;
        }
        
        
        /* Element counter */
        li::before {
          content: counters(index, ".", decimal-leading-zero);
          font-size: 1.5rem;
          text-align: right;
          font-weight: bold;
          min-width: 50px;
          padding-right: 12px;
          font-feature-settings: "tnum";
          font-variant-numeric: tabular-nums;
          align-self: flex-start;
          background-image: linear-gradient(to bottom, aquamarine, orangered);
          background-attachment: fixed;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
        }
        
        
        /* Element separation */
        li + li {
          border-top: 1px solid rgba(255,255,255,0.2);
        }
    </style>

</head>

<body>
    <ul>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lorem ipsum dolor sit amet consecutor adipiscingLorem ipsum dolor sit amet </li>
        <li>Lorem ipsum dolor sit amet consecutor</li>
        <li>Lorem dolor amet sit </li>
        <li>Lo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0