【发布时间】:2018-04-05 17:04:41
【问题描述】:
我有这个 HTML
<section id="selection">
<a href="shop.html#shopBags"><img src="img/coverpictures/frontpage01.jpg"></a>
<a href="shop.html#shopAttachments"><img src="img/coverpictures/frontpage02.jpg"></a>
<a href="shop.html#shopAccessories"><img src="img/coverpictures/frontpage03.jpg"></a>
</section>
有了这个 CSS
#selection{
text-align: -webkit-center;
text-align: -moz-center;
word-spacing: 4vw;
margin: 0;
}
#selection img{
width: 25%;
text-align: center;
}
我希望三个链接/图像在 div 中居中。它在 Chrome 和 Firefox 中运行良好,但在 Safari 中图片浮动正确。我该如何解决这个问题?
【问题讨论】:
-
euh,以及关于容器内的
test-align:center而不是 img ?也删除其他的.. -
这是一个来自 safari 的 bug,bugs.webkit.org/show_bug.cgi?id=40216 从 2010 年到现在。
-
@Troyer 什么??你在开玩笑吗?
标签: html css safari text-align