我想知道如何在 FireFox 中显示我的 CSS 内容。它似乎没有正确显示。这是代码:
div.images:hover {
content:url(http://domain.com/images.png);
}
为什么悬停内容不能在 modzilla 上正确显示?
最佳答案
content
属性适用于 :before
/:after
pseudo elements .因此,它不应该用于 div.images:hover
之类的东西。
相反,使用 background
属性来添加样式:
div.images:hover {
background-image: url(http://domain.com/images.png);
}
关于html - FireFox 中不显示内容属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19871958/