我正在尝试制作一个简单的导航栏,但我希望“导航栏”内的链接为灰色,同时使页面上的其他链接保持默认状态。我似乎无法正常工作。有人可以帮忙吗?
<!-- Start Navbar -->
<strong>
<body "link="gray" vlink="gray" alink="gray">
<style>
table,th,td
{
border:5px solid black;
border-collapse:collapse;
}
</style>
<table class="center" background="http://cdnleicester.tab.co.uk/wp-content/blogs.dir/41/files/2013/10/black.png">
<tr><td><a href="stonehardlinks.html">Home</a></td>
<td><a href="linklist1.html">Link List 1</a></td>
<td>Link List 2</td>
<td>Link List 3</td>
<td>YouTube Channels</td>
</tr>
</table>
</body>
</strong>
<!-- End Navbar -->
<body link="#0000FF" vlink="#800080" alink="#FF0000" leftmargin="10" topmargin="10" scroll="yes" background="http://thewallmachine.com/files/1345578090.jpg">
<a href="examplelink">examplelink</a>
</body>
的CSS
.center a { color:#<whatcoloryouwant>}
的HTML
<body>
<style type="text/css">
table,th,td
{
border:5px solid black;
border-collapse:collapse;
/*replace <strong> wrapping body */
font-weight:700; /*bold*/
}
/*class for all navbar links*/
.center a {
color:#<whatcoloryouwant>
}
/*general links*/
a {
color:#<somecoloryouwant>
}
</style>
<table class="center" background="http://cdnleicester.tab.co.uk/wp-content/blogs.dir/41/files/2013/10/black.png">
<tr><td><a href="stonehardlinks.html">Home</a></td>
<td><a href="linklist1.html">Link List 1</a></td>
<td>Link List 2</td>
<td>Link List 3</td>
<td>YouTube Channels</td>
</tr>
</table>
</body>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句