首页 > 网站 > WEB开发 > 正文

CSS制作的文字加框的导航菜单

2024-04-27 13:57:09
字体:
来源:转载
供稿:网友

<!-- 把下列代码加入到head区内 -->
<style>
#tablist{
padding: 3px 0;
margin-left: 0;
margin-bottom: 0;
margin-top: 0.1em;
font: bold 12px Verdana;
border-bottom: 1px solid gray;
}

#tablist li{
list-style: none;
display: inline;
margin: 0;
}

#tablist li a{
text-decoration: none;
padding: 3px 0.5em;
margin-right: 3px;
border: 1px solid #778;
border-bottom: none;
background: white;
}

#tablist li a:link, #tablist li a:visited{
color: navy;
}

#tablist li a:hover{
color: black;
background: lightyellow;
border-color: navy;
}

#tablist li a.current{
background: lightyellow;
}


</style>


<!-- 把下列代码加入到body区内 -->
<ul id="tablist">
<li><a class="current" href="http://www.vevb.com">www.vevb.com</a></li>
<li><a href="http://www.yahoo.com">Yahoo</a></li>
<li><a href="http://www.google.com">Google</a></li>
<li><a href="http://www.sina.com">sina.com</a></li>
</ul>


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表