#name_wrong_img { wIDth:43px; height:29px; }
这是我的HTML代码:
<img ID="name_wrong_img" src="wrong.jpg" />
上述代码在firefox和Chrome中均可正常工作。
#name_wrong_img { content:url(wrong.jpg); wIDth:43px; height:29px; } <img ID="name_wrong_img" />
这在Chrome中运行良好。但不是在firefox。这是什么问题?
解决方法 firefox不支持内容属性,与Chrome – img元素和/或源是图像时一样。< img>表示内容图像。如果你使用它,它应该有一个src和一个alt。
从the specification:
总结The src attribute must be present,and must contain a valID non-empty URL potentially surrounded by spaces referencing a non-interactive,optionally animated,image resource that is neither paged nor scripted.
以上是内存溢出为你收集整理的html – 内容url在Firefox中不工作[已关闭]全部内容,希望文章能够帮你解决html – 内容url在Firefox中不工作[已关闭]所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)