css如何自訂捲軸(代碼)

來源:互聯網
上載者:User
本篇文章給大家分享的是關於css如何自訂捲軸(代碼),內容很不錯,有需要的朋友可以參考一下,希望可以協助到大家。

html↓

<p id="inp" class="test" contenteditable="true" ></p>

css↓

.test {      display: inline-block;      margin: 60px 40%;      width: 280px;      padding: 5px 4px;      min-height: 20px;      line-height: 20px;      max-height: 72px;      border: 1px solid #ccc;      font-size: 12px;      word-wrap: break-word;      overflow-x: hidden;      overflow-y: auto;      -webkit-user-modify: read-write-plaintext-only;      border-radius: 4px;    }      .test::-webkit-scrollbar {      width: 4px;      height: 1px;    }    .test::-webkit-scrollbar-thumb {      border-radius: 4px;      -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);      background: #C8C8C8;    }    .test::-webkit-scrollbar-track {      border-radius: 4px;      background-color: #FFFFFF;    }


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.