【发布时间】:2017-09-06 15:55:38
【问题描述】:
我有这个图片标签:
<img src="http://placehold.it/200x200"/>
我需要通过css替换图片(因为我无法编辑html),所以我使用了这个css:
img {
content: url('http://lorempixel.com/200/200');
}
它在 chrome 上运行良好,但在 firefox 上运行良好,即,知道为什么吗?
【问题讨论】:
-
这是一个例子,在我的代码中我写了.jpg
-
@user2232273 src 没问题
-
如果你不能编辑html..你如何让HTML知道你的css?