( #video )background-image
内的video id
未显示。我已经包含了pure grid
样式。我已经尝试过使用标签的替代方法,但是稍后我还想在图像中间添加一个按钮。有没有办法使用 div 标签来显示我的背景图像?谢谢
HTML 代码:
<div id="right_content">
<div class="pure-g">
<div class="pure-u-10-24">
<h1 id="about">About</h1>
<p class="text chinese_paragraph">
(Some text)
</p>
</div>
<div class="pure-u-14-24 section2">
<div id="video">
</div>
<button>Watch</button>
</div>
</div>
</div>
CSS 代码:
#right_content {
background-color: #414141;
position: fixed;
right: 0;
top: 0;
width: 700px;
height: 100%;
box-sizing: border-box;
padding: 30px 20px;
overflow: auto;
}
.pure-g > div {
padding-left: 10px;
padding-right: 10px;
box-sizing: border-box;
}
#about {
color: white;
display: inline-block;
position: relative;
border-top: 2px solid white;
vertical-align: middle;
font-family: "Source Sans Pro","Yuanti SC",sans-serif;
margin: 0;
padding: 0;
}
p.text {
color: white;
font-family: "Source Sans Pro","Yuanti SC",sans-serif;
}
.pure-g .section2 {
padding-top: 42px;
}
#video {
background-image: url("../images/video.png");
position: relative;
width: 360px;
height: 200px;
}