HTML& CSS:我如何完全移除< div>侧的滚动条? [英] HTML & CSS: How do I completely remove the scroll-bars on the side of <div>?
本文介绍了HTML& CSS:我如何完全移除< div>侧的滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
移除标签侧面的滚动条时出现问题。我已经阅读了关于添加overflow:hidden属性的一些信息,但我仍然怀疑如何(以及在何处)应用该属性。你可以帮我吗?
HTML:
< html> ;
< head>
< title> Circle Motion< / title>
< link rel =stylesheettype =text / csshref =styles.css/>
< / head>
< body>
< div id =outer-wrapper>
< div id =wrapper>
< div id =top>
< / div>
< div id =box_1>
< img src =chrome_400x400.png/>
< / div>
< div id =box_2>
< / div>
< / div>
< / div>
< / body>
CSS:
#outer-wrapper {
height:100%;
width:1000px;
margin:0px auto;
background-color:EAFFDB;
-moz-border-radius:15px;
border-radius:15px;
}
#wrapper {
height:100%;
width:960px;
margin:0px auto;
background-color:EAFFDB;
溢出:auto;
}
#top {
width:900px;
height:110px;
margin-top:35px;
margin-left:auto;
margin-right:auto;
margin-bottom:35px;
背景颜色:白色;
-moz-border-radius:15px;
border-radius:15px;
}
#box_1 {
width:430px;
height:430px;
背景颜色:黑色;
-moz-border-radius:15px;
border-radius:15px;
float:left;
margin-left:30px;
margin-bottom:30px;
text-align:center;
}
#box_1 img {
margin:15px 0px;
}
#box_2 {
width:430px;
height:430px;
背景颜色:白色;
-moz-border-radius:15px;
border-radius:15px;
float:right;
margin-right:30px;
margin-bottom:30px;
text-align:center;
}
#box_1 img {
margin:15px 0px;
解决方案
它应该在 #wrapper
造型;
#wrapper {
height:100 %;
width:960px;
margin:0px auto;
背景颜色:#EAFFDB; / *请注意,您在颜色之前错过了此标签,这可能会起作用,但这样更安全* /
overflow:hidden; / *这是汽车,而它应该被隐藏* /
}
!
I have a problem removing the scroll bars on the side of my tags. I have read something about adding the overflow: hidden attribute, but I am still in doubt of how to (and where to) apply the attribute. Can you help me out?
HTML:
<html>
<head>
<title>Circle Motion</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<div id="outer-wrapper">
<div id="wrapper">
<div id="top">
</div>
<div id="box_1">
<img src="chrome_400x400.png" />
</div>
<div id="box_2">
</div>
</div>
</div>
</body>
CSS:
#outer-wrapper {
height: 100%;
width: 1000px;
margin: 0px auto;
background-color: EAFFDB;
-moz-border-radius: 15px;
border-radius: 15px;
}
#wrapper {
height: 100%;
width: 960px;
margin: 0px auto;
background-color: EAFFDB;
overflow: auto;
}
#top {
width: 900px;
height: 110px;
margin-top: 35px;
margin-left: auto;
margin-right: auto;
margin-bottom: 35px;
background-color: white;
-moz-border-radius: 15px;
border-radius: 15px;
}
#box_1 {
width: 430px;
height: 430px;
background-color: black;
-moz-border-radius: 15px;
border-radius: 15px;
float:left;
margin-left: 30px;
margin-bottom: 30px;
text-align: center;
}
#box_1 img {
margin: 15px 0px;
}
#box_2 {
width: 430px;
height: 430px;
background-color: white;
-moz-border-radius: 15px;
border-radius: 15px;
float:right;
margin-right: 30px;
margin-bottom: 30px;
text-align: center;
}
#box_1 img {
margin: 15px 0px;
}
解决方案
It should be in your #wrapper
styling;
#wrapper {
height: 100%;
width: 960px;
margin: 0px auto;
background-color: #EAFFDB; /*note you were missing this hashtag before the color, which might work, but this is safer*/
overflow: hidden; /*this was auto, while it should be hidden*/
}
Hope this helped!
这篇关于HTML& CSS:我如何完全移除< div>侧的滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文