【发布时间】:2017-02-21 19:14:11
【问题描述】:
例如,Google Chrome 和 Opera 的最小宽度标签有问题,在 firefox 中运行良好
例如,我想显示带有内联显示和图像的列,我在 Firefox 中看到完美,图像显示为砖石,它很好,但在 google chrome 中显示不好,问题是最小宽度,我如何在谷歌浏览器等中解决这个问题,谢谢,问候
#frnt_item
{
display:inline-block;
position:relative;
min-width:10%;
max-height:350px;
border:1px solid #EEE;
vertical-align:text-top;
margin-left:7px;
margin-bottom:7px;
-webkit-border-radius: 10px;
-webkit-border-top-right-radius: 2px;
-webkit-border-bottom-left-radius: 2px;
-moz-border-radius: 10px;
-moz-border-radius-topright: 2px;
-moz-border-radius-bottomleft: 2px;
border-radius: 10px;
border-top-right-radius: 2px;
border-bottom-left-radius: 2px;
overflow:hidden;
cursor:pointer;
cursor:hand;
}
#frnt_item_content img
{
width:100%;
max-height:350px;
}
您可以在此处查看示例:
https://jsfiddle.net/rzfrjL1g/
解决方案:要解决此问题,只需在 frnt_item_content img
中放入 10 % 而不是 100 % 并同时放入 min-width 而不是 width【问题讨论】:
-
也发布您的标记,以便我们拥有minimal reproducible example。
-
是的,但是在 Firefox 中看的很好,在 chrome 中没有
-
在我看来,它们在 ff 和 chrome 中是一样的。