【发布时间】:2016-09-11 11:20:04
【问题描述】:
仍在学习 css 如何与 html 一起工作,我目前正在尝试将图像与文本重叠。这是我到目前为止所拥有的。
<style>
.aboutus_oven{
background:url('Images/oventemp.jpg') no-repeat center;
background-size: 100% 100%;
height:760px;
margin-top: 208px;
position: absolute;
}
</style>
<div class="aboutus_oven">
<div class="aboutus_title">
<h1> About Us</h1>
</div>
</div>
.aboutus_title{
margin-top:0px;
margin-left: 65px;
position: relative;
}
不知道是不是因为他们是同一个班的?我在每个班级中指出的具体利润——它们是否相互矛盾? 我附上了一张图片,展示了我想要实现的目标。
【问题讨论】:
-
只增加标题的margin-top
-
哦,顺便说一句,最好使用 % 而非像素
-
你能提供你的jsfiddle吗?
标签: html css image text overlap