CSS0025: div 可以滚动 但是隐藏滚动条 禁止选中文字,设置body可滚动不显示滚动条
1,
<style> .cont { width: 200px; height: 200px; border: 1px solid #000000; overflow-x: hidden; } .cont::-webkit-scrollbar { display: none; } </style>
2,禁止选中文字,设置body可滚动不显示滚动条
body { margin: 0px; padding: 0px; height: auto; inset: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; tab-size: 4; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; } body::-webkit-scrollbar { display: none; }
琥珀君的博客