隐藏滚动条的HTML页面上 [英] Hiding the scrollbar on an HTML page
本文介绍了隐藏滚动条的HTML页面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
CSS可以被用来隐藏滚动条?你会怎样做呢?
Can CSS be used to hide the scroll-bar? How would you do this?
推荐答案
设置溢出:隐藏;
在身上的标签是这样的:
Set overflow: hidden;
on the body tag like this:
<style type="text/css">
body {
overflow:hidden;
}
</style>
在code以上的皮张水平和垂直滚动条。
The code above hides both horizontal and vertical scrollbar.
如果你想隐藏的只有垂直滚动条,使用溢出-Y
:
If you want to hide only the vertical scrollbar, use overflow-y
:
<style type="text/css">
body {
overflow-y:hidden;
}
</style>
如果你想隐藏的只有水平滚动条,使用溢出-X
:
<style type="text/css">
body {
overflow-x:hidden;
}
</style>
更新:我的意思是隐藏的,对不起,刚刚醒来: - )
update: I meant hidden, sorry, just woke up :-)
这篇关于隐藏滚动条的HTML页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文