css ::-webkit-scrollbar

<html>
<head>
<title>-webkit-scrollbar</title>
<style type="text/css">
.div1 {
width:800px;height:100px;overflow-y: auto;border:1px solid #ccc;
}
.div2 {
width:800px;height:100px;overflow-y: auto;border:1px solid #ccc;
}
.div2::-webkit-scrollbar {
display:none;
}
</style>
</head>
<body>
<div>
<h2>CSS 自定義滾動(dòng)條</h2>
<div class="div1">
<p>Falling in love with you was the easiest thing I’ve ever done.</p>
<p>愛(ài)上你是我做過(guò)的最容易的一件事。</p>
<p>There are all kinds of people in this world. It happens that we have become friends. This is not fate. It is just that we should be friends.</p>
<p>這世界上有各種各樣的人,恰巧我們成為了朋友,這不是緣分,僅僅只是我們本就應(yīng)該是朋友。</p>
<p>The world’s full of lonely people afraid to make the first move.</p>
<p>這個(gè)世界每一個(gè)孤獨(dú)的人都害怕邁出第一步。</p>
<p>They don’t have a choice, but you do.</p>
<p>他們沒(méi)得選擇,但你有。</p>
<p>You never win with violence. You only win when you maintain your dignity.</p>
<p>你永遠(yuǎn)不會(huì)以暴力取勝。只有保持尊嚴(yán)才能戰(zhàn)勝一切。</p>
</div>
<br>
<br>
<br>
<br>
<div class="div2">
<p>Falling in love with you was the easiest thing I’ve ever done.</p>
<p>愛(ài)上你是我做過(guò)的最容易的一件事。</p>
<p>There are all kinds of people in this world. It happens that we have become friends. This is not fate. It is just that we should be friends.</p>
<p>這世界上有各種各樣的人,恰巧我們成為了朋友,這不是緣分,僅僅只是我們本就應(yīng)該是朋友。</p>
<p>The world’s full of lonely people afraid to make the first move.</p>
<p>這個(gè)世界每一個(gè)孤獨(dú)的人都害怕邁出第一步。</p>
<p>They don’t have a choice, but you do.</p>
<p>他們沒(méi)得選擇,但你有。</p>
<p>You never win with violence. You only win when you maintain your dignity.</p>
<p>你永遠(yuǎn)不會(huì)以暴力取勝。只有保持尊嚴(yán)才能戰(zhàn)勝一切。</p>
</div>
</div>
</body>
</html>