【发布时间】:2019-06-28 21:05:12
【问题描述】:
如何在 iOS 中实现这一点?在 Firefox 中它可以工作,但找不到适用于 iPad 的解决方案。
<style>
#products {
display: flex;
}
#products img {
width: auto !important;
height: auto !important;
}
</style>
<div id="products">
<img src="https://nomadweb.design/img/imac-frame-ilioslighting.jpg" width="980" height="815" />
<img src="https://nomadweb.design/img/phone-frame-ilioslighting.jpg" width="406" height="815" />
<img src="https://nomadweb.design/img/imac-frame-mallachandcompany.jpg" width="980" height="815" />
<img src="https://nomadweb.design/img/phone-frame-mallachandcompany.jpg" width="406" height="815" />
<img src="https://nomadweb.design/img/imac-frame-bighousesound.jpg" width="980" height="815" />
<img src="https://nomadweb.design/img/phone-frame-bighousesound.jpg" width="406" height="815" />
</div>
这是它在 Firefox 中的外观 你如何在 iOS 中做到这一点?
这是它在 Firefox 中的响应方式,希望在 iOS 中实现相同的效果。
【问题讨论】:
-
它在 ios 上的显示效果如何?
-
图片以全宽显示,因此太宽了。
-
你试过
display: -webkit-box;或display: -webkit-flex;吗?