我到处寻找解决方案,但没有找到任何东西..
我在 HTML5 页面中有此代码
<div>
<p class="title_paragraph">
<a id="title" href="http://www.milanochamberorchestra.com">Milano Chamber Orchestra</a>
</p>
</div>
CSS 是
.title_paragraph {
color: #f89938;
text-align: center;
text-shadow: 0 0 12px rgba(230,160,55,0.6);
font-family: 'Buda', cursive;
font-weight: 100;
font-size: 46px;
z-index: 0;
position: relative;
}
#title:link {text-decoration:none;}
#title:visited {text-decoration:none;}
#title:hover {text-decoration:none;}
#title:active {text-decoration:none;}
为什么链接没有以正确的颜色显示?它必须是黄色/橙色,而不是紫色!
最佳答案
试试这个
.title_paragraph a{
color: #f89938;
text-align: center;
text-shadow: 0 0 12px rgba(230,160,55,0.6);
font-family: 'Buda', cursive;
font-weight: 100;
font-size: 46px;
z-index: 0;
position: relative;
}
#title:link {text-decoration:none;}
#title:visited {text-decoration:none;}
#title:hover {text-decoration:none;}
#title:active {text-decoration:none;}
关于html - 如何设置段落中链接的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16651971/