如何摆脱滚动条? [英] How to get rid of the scrollbar?
本文介绍了如何摆脱滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在div HTML元素中,我定义了标题部分。样式表如下:
#header {
color:Purple;
身高:30px;
宽度:660px;
背景:#fff url(../ Images / MetroBackgound.png)
}
但滚动条出现在标题框的右侧。我怎么能摆脱它?谢谢。
解决方案
你需要让尺寸更大,计算正确的尺寸。此外,谈到图像时,给出宽度和高度都没有好处,只给出其中一个;通过这种方式,您可以避免改变纵横比或不适合某些外部尺寸的风险。
-SA
另一个简单的方法是添加
overflow-y:hidden;
$ c $ b in ccs
In a div HTML element, I defined the header part. The stylesheet is below:
#header {
color: Purple;
height: 30px;
width: 660px;
background: #fff url("../Images/MetroBackgound.png" )
}
But A scrollbar appears on the right of the header box. How can I get rid of it? Thanks.
解决方案
You need to make the size a big bigger, calculate correct size. Besides, when it comes to images, it's no good to give both width and height, give only one of them; this way, you can avoid the risk of changing aspect ratio or not fitting in some outer size.
—SA
Another easy way is add
overflow-y: hidden;
in ccs.
这篇关于如何摆脱滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文