我在使用 IE8 时遇到问题:它不显示此网站上的特色图片:http://www.melisayavas.com/news/
这是我的 functions.php 中用于输出特色图片的代码:
if ( function_exists( 'add_theme_support' )) {
add_theme_support( 'post-thumbnails' );
}
if ( function_exists('add_image_size')) {
add_image_size('news-thumb', 200, 200);
}
这是用于特色图片的 CSS:
.post-thumb {
float: left;
padding: 10px;
}
特别针对 IE8 我有这个 CSS:
.post-thumb img {
float: left\9;
margin-top: 10px\9;
margin-right: 10px\9;
}
如果我向 .post-thumb 元素
添加边距或宽度,图像会显示在 IE8 上,但我不需要固定的宽度或高度。我不明白为什么它不获取图像的宽度和高度。
最佳答案
问题是由这条规则引起的:
img, object, embed {
max-width: 100%;
}
如果您从此规则中删除 img
,该图像将出现在 IE8 中。
关于css - Wordpress 精选图片在 IE8 中不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10573458/