gpt4 book ai didi

html - 超链接不会在悬停或访问时改变颜色

转载 作者:太空宇宙 更新时间:2023-11-04 14:50:04 25 4
gpt4 key购买 nike

这是我的 HTML 的一部分。当您将鼠标悬停在超链接上时,超链接不会改变颜色,即使我已将它们编码为。你知道为什么不吗?

<div class = 'container' >
<header> name goes here Illustration</header>
<nav>
<!-- Site navigation menu -->
<ul>
<li><a href = 'index.html'>home</a></li>
<li><a href = '#'>film & Game </a></li>
<li><a href = '#'>sketchbook</a></li>
<li><a href = '#'>paintings</a></li>
<li><a href = 'contact.html'>contact/Info</a></li>
</ul>
</nav>

<!-- Main content -->
<div id='content' > </div>


</div>

这是我的 CSS 的一部分

a:      link{
color: white;
font-size: 40px;
font-family: Modern No. 20;
text-decoration: none;

}

a: visited{
color: yellow;
font-size: 20px;
font-family: Modern No. 20;
text-decoration: none;
}

a: hover{
color: blue;
text-decoration: underline;
}

最佳答案

需要去掉a:link之间的空格,即:

a:link{
color: white;
font-size: 40px;
font-family: Modern No. 20;
text-decoration: none;

}

a:visited{
color: yellow;
font-size: 20px;
font-family: Modern No. 20;
text-decoration: none;
}

a:hover{
color: blue;
text-decoration: underline;
}

关于html - 超链接不会在悬停或访问时改变颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17477179/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com