当导航栏将其状态更改为fixed时,我已经更改了链接的文本颜色。我之前读过一个答案,但没有起作用:Is it possible to set the equivalent of a src attribute of an img tag in CSS?
下面的代码显示了在滚动时要更改的图像"logo.png“的位置。谢谢
<div class="logo-box">
<div class="logo">
<a href="#">
<img src="images/logo.png" alt="">
</a>
</div>
</div>发布于 2018-05-27 06:45:31
不要紧,我自己解决了,我忘了把固定导航栏= equals的属性设置为滚动。
.main-header.fixed-header .main-box .logo-box .logo img{
height: 50px;
content: url("../images/logo.png") !important;
} https://stackoverflow.com/questions/50547553
复制相似问题