【发布时间】:2014-08-07 19:14:38
【问题描述】:
我的 div 高度部分有问题。我试图将 div 高度设置为 100%,但它不起作用。如果我没有使用 html 5,我的代码可以正常工作。 This is the link 我在其中包含了带有以下错误的实时网站。
这是我的 style.css 代码:
.slide {
background-attachment: fixed;
width: 100%;
height: 100%;
position: relative;
padding: 30px;
}
#slide1 {
background-color: #00B4FF;
}
#slide2 {
background-color: #000000;
}
#slide3 {
background-color: #00B4FF;
height: 700px;
}
#slide4 {
background-color: yellow;
width: 100%;
height: 100%;
}
#slide5 {
background-color: #f8f8f8;
}
#slide6 {
background-color: orange;
height: 350px;
}
#slide7 {
background-color: #f8f8f8;
}
我尝试在每个#slide id 中手动将高度更改为 100%,但仍然无法正常工作。
【问题讨论】:
-
.slide的填充似乎有问题 -
我不明白这里的问题。你能给出更好的解释或发布想要的结果截图吗?
-
@Austin 是的,我已经调查过了,但对我的情况仍然没有帮助
-
@Typist 如果是这个问题,有什么办法可以解决吗?
标签: javascript jquery html css