【发布时间】:2017-08-13 08:56:49
【问题描述】:
我在使用 Wordpress 和 CSS 时遇到问题。我想让我的图像成为帖子的全宽(800 像素),但现在它们的上限为 620 像素。当我进入 Inspect Element 时,这是我得到的 CSS 代码:
img[Attributes Style] {
width: 640px;
height: 427px;
}
在 Inspect Element 中,此代码块显示为灰色,我无法对其进行编辑。这是什么?什么是[属性样式]。在 Wordpress 的 CSS 编辑器中,我添加了 img max-width: 800px 的代码,但这没有任何效果。我也尝试过 img width: 800px,但这会强制所有图像为 800px。
请帮忙!谢谢! :)
【问题讨论】:
-
为什么不定位那些图像:
.containerClass img {width:100%}其中 containerClass 是包装每个帖子的 div / article 元素的类