HTML和CSS:如何完全删除一侧的滚动条?
删除标签一侧的滚动条时出现问题。我已经阅读了一些关于添加overflow:hidden属性的内容,但是我仍然不知道如何以及在哪里应用该属性。你能帮我吗 HTML: 它应该在你的包装样式 希望这有帮助 它应该在包装器样式中 希望这有帮助 是的,您应该对必须从中删除滚动条的元素应用overflow:hidden 并且您缺少十六进制颜色代码之前的哈希标记。是的,您应该对必须从中删除滚动条的元素应用溢出:隐藏HTML和CSS:如何完全删除一侧的滚动条?,html,css,Html,Css,删除标签一侧的滚动条时出现问题。我已经阅读了一些关于添加overflow:hidden属性的内容,但是我仍然不知道如何以及在哪里应用该属性。你能帮我吗 HTML: 它应该在你的包装样式 希望这有帮助 它应该在包装器样式中 希望这有帮助 是的,您应该对必须从中删除滚动条的元素应用overflow:hidden 并且您缺少十六进制颜色代码之前的哈希标记。是的,您应该对必须从中删除滚动条的元素应用溢出:隐藏 并且您缺少十六进制颜色代码之前的哈希标记。使用溢出:隐藏;而不是溢出:自动;在包装类中使用溢出
并且您缺少十六进制颜色代码之前的哈希标记。使用溢出:隐藏;而不是溢出:自动;在包装类中使用溢出:隐藏;而不是溢出:自动;在包装类中,为什么这个div一开始就有一个滚动条,这是不正常的?!为什么这个div一开始就有一个滚动条,这不正常?!
<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>
#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;
}
#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*/
}