<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .box { width: 200px; height: 200px; overflow: auto; } .item { width: 100px; height: 500px; background: red; } .box::-webkit-scrollbar { display: none; } </style> </head> <body> <div class="box"> <div class="item">sddddddddddddddddddddddds</div> </div> </body> </html>
谷歌浏览器css 实现隐藏滚动条
最新推荐文章于 2025-10-22 16:31:52 发布
本文提供了一个使用纯CSS实现的网页布局示例,重点展示了如何通过CSS样式隐藏滚动条,同时保持内容的滚动功能不变。该示例利用了一个简单的盒子模型来演示滚动条隐藏效果。
1万+

被折叠的 条评论
为什么被折叠?



