自定义滚动条
html↓
<div id="inp" class="test" contenteditable="true" ></div>
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; }
效果图
(๑′ᴗ‵๑)I❤
相关推荐
切慕溪水 2019-11-03
vavid 2018-04-15
ajhongshaorou 2019-06-29
武林半侠 2019-06-29
dangzhangjing 2019-06-27
语帆 2015-04-15
zhouguizhi 2013-02-28
AlisaClass 2012-11-20
淡风wisdon大大 2012-08-16
SuiKaSan的自学室 2012-08-11
AnyBisks 2011-11-27
liusure0 2011-09-27
startXUEBA 2011-07-19
xiaohuli 2011-05-11
Ydgent 2012-07-28
Juey 2017-07-21