【发布时间】:2016-02-26 07:11:52
【问题描述】:
CSS 样式的新功能。我的页面上有一个响应式背景图像,我希望在其底部中心放置一个圆形徽标。无论视图有多小/大,我都希望此图像保持在相同的位置(相对于背景图像的底部)。
我一直在使用图像填充和定位,但都没有响应。当屏幕变小时,图像向上移动。当它变大时,图像会向下移动。我希望它保持在相同的位置。
这是我最近尝试的一个快速小提琴:
https://jsfiddle.net/ybeuvn9m/
还有代码:
<div class="container-fluid">
<div class="row">
<div class="splash col-sm-12">
<div class="photo">
<img class="img-responsive img-circle logo" src="http://i.imgur.com/Dum5A8J.png">
</div>
</div>
</div>
</div>
.logo {
padding-top: 200px;
width: 10%;
margin: 0 auto;
display: block;
}
.splash {
background: url('http://s169923.gridserver.com/images/IntelligentsiaMocha.jpg');
background-repeat: no-repeat;
background-size: cover;
height: 50vh;
background-color: rgba(0, 0, 0, 0.2);
background-blend-mode: overlay;
}
【问题讨论】: