【发布时间】:2017-09-27 01:37:12
【问题描述】:
我想在我的标题中添加响应式图片。它在我的屏幕上看起来很完美,但是当我改变屏幕尺寸时它就错位了。
HTML:
<section id="cover">
<div class="container">
<div class="row text-center">
<div class="col-sm-12 character">
</div>
</div>
</div>
</section>
CSS:
#cover {
background: url('../img/coverBg.png') no-repeat center center;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
-webkit-border-bottom-right-radius: 400px 100px;
-webkit-border-bottom-left-radius: 400px 100px;
margin-bottom: 70px;
position: relative;
}
.character {
background: url("../img/character.png") no-repeat center center;
width: 170px;
height: 245px;
top: 67px;
}
【问题讨论】:
标签: css image position responsive