好的,我已经尝试使用垂直对齐和文本对齐属性将这个响应式图像居中,但没有成功。谁能告诉我我哪里做错了。我希望图像是垂直和水平在页面的中间。
<div class="circle">
<div class="bl-circle" style="z-index:9999;">
<a href="http://www.leedsrush.com"><img src="images/Circular.png" onmouseover="this.src='images/leeds.png'" onmouseout="this.src='images/Circular.png'" style="width:100%; height:100%;"/>
</a>
</div>
</div>
.bl-circle{
position: absolute;
max-width:250px;
max-height:250px;
height:100%;
width:100%;
margin-left:auto;
margin-right:auto;
}
.circle{
}发布于 2013-08-16 23:33:43
我想看看这篇教程:
http://pmob.co.uk/pob/hoz-vert-center.htm
这是当我试图在页面中居中元素时使用的。每次都像符咒一样工作,特别是底部的例子,当你不知道元素的宽度和高度时。
https://stackoverflow.com/questions/18276490
复制相似问题