0
这是我的css我想添加另一个png图片,这是与徘徊时倒置的颜色。我该怎么做 ?我如何改变,图像的div在悬停在CSS时改变颜色
div#artlog{
width:910px;
height: 58px;
margin-top: 20px;
background-image: url("../obr/artisthead.jpg");
这是我的css我想添加另一个png图片,这是与徘徊时倒置的颜色。我该怎么做 ?我如何改变,图像的div在悬停在CSS时改变颜色
div#artlog{
width:910px;
height: 58px;
margin-top: 20px;
background-image: url("../obr/artisthead.jpg");
只需添加一个悬停类
div#artlog:hover{
background-image: url("../obr/artisthead-inverted.jpg");
}
试试下面的,我认为这将解决您的问题:
div#artlog:hover{
width:910px;
height: 58px;
margin-top: 20px;
background-image: url("../obr/inverted_color_artisthead.jpg");
不要忘记将inverted_color_artisthead.jpg
在同一文件夹中另一张图片。 欲了解更多详情,你可以阅读w3.org documentation