CSS hide scrollbars supports cross desktop browser.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
HTML
<div class="box"> <div class="scroll"> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p> </div> </div>
CSS
.scroll { -ms-overflow-style: none; scrollbar-width: none; } .scroll::-webkit-scrollbar { display: none; } .box { width: 300px; height: 180px; font-size: 16px; line-height: 1.5; border-radius: 15px; color: #404660; border: none; overflow: hidden; background: #fff; border: 1px solid #e1e6f9; position: relative; } .box .scroll { padding: 20px; overflow-y: auto; max-height: 100%; } .box:before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20px; border-radius: 0 0 15px 15px; background: linear-gradient(rgba(255, 255, 255, 0), white); } * { box-sizing: border-box; }
Comments
Post a Comment