英文:
How to make a textarea scrollable with the mouse while still having the scrollbar removed?
问题
我认为滚动条看起来不美观。我已将其移除,但现在无法使用鼠标滚动。我在网上搜索未找到任何解决方法。是否有帮助?
我尝试使其看起来更清爽,我期望滚动条会消失,事实上也确实消失了,但现在文本区域不再可滚动。
英文:
As the title says, I think a scrollbar looks ugly. I removed it, but now it's not mouse-scrollable. I searched online and found nothing. Any help?
I tried to make it look cleaner, i expected the scrollbar to dissapear, which it did, but now the textarea is no longer scrollable
答案1
得分: 1
以下是翻译好的内容:
.element {
-ms-overflow-style: none;
scrollbar-width: none;
}
.element::webkit-scrollbar {
display: none;
}
英文:
I think this could effectively (and fairly cross-browser) be achieved with the following CSS:
.element {
-ms-overflow-style: none;
scrollbar-width: none;
}
.element::webkit-scrollbar {
display: none;
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论