[英]css background-color not working on first div
我有一个3个固定位置的div,第一个不显示背景色,我在这里挠头,因为我已经尝试了一切,我的代码看不到任何异常,不确定为什么会发生这种情况有人可以帮忙。
这是我的HTML:
<div class"header">
</div>
<div class="gssd">
<iframe frameborder="0" scrolling="no" src="http://www.example.com"></iframe>
</div>
<div class="gosd">
<p>testing 123</p>
</div>
这是我的CSS:
.header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 100px;
font-family: Helvetica;
background-color: #000;
font-weight: bold;
margin: 0;
padding: 0;
}
.gssd {
position: fixed;
top: 100px;
bottom: 100px;
left: 0;
right: 0;
}
.gssd > iframe {
background: url(/tvScreensScript/img/acquire-wp.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
overflow: auto;
width: 100%;
height: 100%;
}
.gosd {
position: fixed;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 100px;
font-size: 4em;
color: #141f65;
background: url(/tvScreensScript/img/scroll-bg.png) no-repeat top right;
font-family: Comic Sans MS;
font-weight: bold;
}
在html的div上设置类时,您缺少等号。 class"header"
应该是class="header"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.