- <style type="text/css">
- #Tab1{
- padding:0px;
- border:1px solid #E4E4E4;
- margin-top:10px
- }
- .Menubox {
- height:30px;
- line-height:30px;
- background:url(../p_w_picpaths/sprite_bg.png) 0 -230px no-repeat;
- }
- .Menubox ul{
- margin:0px;
- padding:0px;
- }
- .Menubox li{
- float:left;
- display:block;
- cursor:pointer;
- width:50%;
- text-align:center;
- background:url(p_w_picpaths/titlebg.gif) 0 -28px no-repeat;
- }
- .Menubox li.mhover{
- padding:0px;
- background:#fff;
- width:50%;
- color:#A42023;
- font-weight:bold;
- height:30px;
- line-height:30px;
- }
- .Contentbox{
- clear:both;
- margin-top:0px;
- border-top:none;
- height:250px;
- padding-top:8px;
- }
- </style>
- <script type="text/javascript">
- function setTab(name, cursel, n) {
- for (i = 1; i <= n; i++) {
- var menu = document.getElementById(name + i);
- var con = document.getElementById("con_" + name + "_" + i);
- menu.className = i == cursel ? "mhover" : "";
- con.style.display = i == cursel ? "block" : "none";
- }
- }
- </script>
- <body>
- <div id="Tab1">
- <div class="Menubox">
- <ul>
- <li class="mhover" id="one1" οnmοuseοver="setTab('one',1,2)">热门促销 </li>
- <li id="one2" οnmοuseοver="setTab('one',2,2)">网站公告 </li>
- </ul>
- </div>
- <div class="Contentbox">
- <div id="con_one_1">
- abc
- </div>
- <div id="con_one_2" style="display: none">
- efd
- </div>
- </div>
- </div>
- </body>