css选项卡 帮忙看看怎么点击时在流着红线的情况下遮盖住红线,实现选项卡效果

来源:百度知道 编辑:UC知道 时间:2024/07/02 08:17:37
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>简洁Tab</title>
<style type="text/css">
<!--
body,div,ul,li{
padding:0;
text-align:center;
}
body{
font:12px "宋体";
text-align:center;
}
a:link{
color:#00F;
text-decoration:none;
}
a:visited {
color: #00F;
text-decoration:none;
}
a:hover {
color: #c00;
text-decoration:underline;
}
ul{ list-style:none;}
/*菜单class*/
.Menubox {
width:485px;
background:url(hz1.jpg);
background-repeat:no-repeat;
margin:0px 2px 0px 0px; /*调节上面与下面左右调

改动下面2个:

.Menubox li.hover{
padding:0px;
width:119px;
margin: 0px 2px 0px 0px;
border-left:1px solid #D6D3D6;
border-top:1px solid #D6D3D6;
border-right:1px solid #D6D3D6;
background:#fff url(h1.jpg);
color:#739242;
font-weight:bold;
height:36px;
line-height:32px;
position:relative;
z-index:2;
margin-bottom:-4px;
}
.Contentbox{
width:485px;
clear:both;
margin-top:0px;
border:1px solid #D6D3D6;
border-top:4px solid #CF0000;
height:278px;
text-align:center;
padding-top:8px;
position:relative;
z-index:1;
}

<ul>背景用带红色线条背景!
<li>背景其他色
ul 和 li 行高要一样!