<分区>
我在 flexbox 中使用绝对元素。我的代码在 chrome 上运行,但 firefox 没有将我的绝对元素居中,也没有缩放我的图像。
这是我的代码
<figure class="banner">
<img src="http://doc.jsfiddle.net/_downloads/jsfiddle-desktop-1440x900-a.png" />
<figcaption>
<p>TEXT</p>
<h3>TİTLE</h3>
<p>TEXT</p>
<a href="#">DETAIL</a>
</figcaption>
</figure>
CSS:
.banner{display:flex; overflow:hidden; justify-content:center; position:relative; width:350px;}
.banner figcaption{position:absolute; z-index:1; color:@white; text-align:center; width:90%; align-self:center; background:#f00;}