为什么 following example在 Firefox 4 中显示图像,但在 Chrome 10 和 Internet Explorer 8 中不显示图像?
HTML:
<div style="background-image: url('http://www.mypicx.com/uploadimg/1312875436_05012011_2.png')"></div>
CSS:
div {
width: 60px;
height: 60px;
border: 1px solid black;
}
有什么解决方法吗?
最佳答案
正如 c-smile 提到的:只需要删除 url()
中的撇号:
<div style="background-image: url(http://i54.tinypic.com/4zuxif.jpg)"></div>
关于html - 为什么内联 "background-image"样式在 Chrome 10 和 Internet Explorer 8 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5846637/