Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->网站设计 ->CSS/CSS2 ->正文

仿淘宝网站的导航标签效果

来源:Linuxdby.com 作者:Webmaster 时间:2007-04-12 点击: [收藏] [投稿]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
* {
 margin: 0; padding:0
}
body {
 margin-top: 10px;
 margin-right: auto;
 margin-bottom: 10px;
 margin-left: auto;
 text-align: center;
 height: auto;
 width: auto;
 background-color: #666666;
 font-size: 12px;
 color: #000000;
}
#container {
 text-align: left;
 width: 760px;
 height: 400px;
 background-color: #FFFFFF;
 padding: 20px;
}

#container #title {
 height: 31px;
 background-color: #3A81C8;
}
#container #title li {
 float: left;
 list-style-type: none;
 height: 28px;
 line-height: 28px;
 text-align: center;
 margin-right: 1px;
}
#container #title ul {
 background-color: #FFFFFF;
 height: 28px;
}
#container #title a {
 text-decoration: none;
 color: #000000;
 display: block;
 width: auto;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323582.gif);
 background-repeat: no-repeat;
 background-position: left -29px;
}
#container #title a span{
 display: block;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323449.gif);
 background-repeat: no-repeat;
 background-position: right -29px;
 padding-right: 15px;
 padding-left: 15px; 
}
#container #title a:hover {
 text-decoration: none;
 color: #000000;
 display: block;
 width: auto;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323582.gif);
 background-repeat: no-repeat;
 background-position: left -87px;
}
#container #title a:hover span{
 display: block;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323449.gif);
 background-position: right -87px;
 padding-right: 15px;
 padding-left: 15px; 
}
#container #title #download a:hover {
 text-decoration: none;
 color: #ffffff;
 display: block;
 width: auto;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323582.gif);
 background-repeat: no-repeat;
 background-position: left 0px;
}
#container #title #download a:hover span{
 display: block;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323449.gif);
 background-position: right 0px;
 padding-right: 15px;
 padding-left: 15px; 
}
#container #title #product a:hover {
 text-decoration: none;
 color: #ffffff;
 display: block;
 width: auto;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323582.gif);
 background-repeat: no-repeat;
 background-position: left -58px;
}
#container #title #product a:hover span{
 display: block;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323449.gif);
 background-position: right -58px;
 padding-right: 15px;
 padding-left: 15px; 
}
#container #title #login a:hover {
 text-decoration: none;
 color: #ffffff;
 display: block;
 width: auto;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323582.gif);
 background-repeat: no-repeat;
 background-position: left -145px;
}
#container #title #login a:hover span{
 display: block;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323449.gif);
 background-position: right -145px;
 padding-right: 15px;
 padding-left: 15px; 
}
#container #title #contactus a:hover {
 text-decoration: none;
 color: #ffffff;
 display: block;
 width: auto;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323582.gif);
 background-repeat: no-repeat;
 background-position: left -174px;
}
#container #title #contactus a:hover span{
 display: block;
 background-image: url(http://webdesign.chinaitlab.com/UploadFiles_8014/200609/20060913225323449.gif);
 background-position: right -174px;
 padding-right: 15px;
 padding-left: 15px; 
}
#container #title #homepage .selectli {
 text-decoration: none;
 color: #ffffff;

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇: CSS样式用好表单的下拉式菜单   下一篇: CSS教程—元素的定位

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号