Html 超级链接赢得';不要在悬停或打开时更改颜色
这是我的HTML的一部分。当您将鼠标悬停在超链接上时,超链接不会改变颜色,即使我已将其编码为。你知道为什么不行吗Html 超级链接赢得';不要在悬停或打开时更改颜色,html,css,Html,Css,这是我的HTML的一部分。当您将鼠标悬停在超链接上时,超链接不会改变颜色,即使我已将其编码为。你知道为什么不行吗 <div class = 'container' > <header> name goes here Illustration</header> <nav> <!-- Site navigation menu -->
<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>
您需要删除
a:
和链接之间的空白,即:
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:hover
与a:hover
:)不同。好的,非常感谢,实际上worked@gustavohenke,您的编辑实际上修复了代码,删除了错误,并使此问题无法回答。请不要这样做。还有:font家族:“现代20号”代码>
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;
}