zoukankan      html  css  js  c++  java
  • Tab

    <%@ Page Language="C#"  AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <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;}
    /*选项卡1*/
    #Tab1{
    460px;
    margin:0px;
    padding:0px;
    margin:0 auto;}
    /*选项卡2*/
    #Tab2{
    576px;
    margin:0px;
    padding:0px;
    margin:0 auto;}
    /*菜单class*/
    .Menubox {
    100%;
    background:url(http://www.makewing.com/images/uppic/200801081251340.gif);
    height:28px;
    line-height:28px;
    }
    .Menubox ul{
    margin:0px;
    padding:0px;
    }
    .Menubox li{
    float:left;
    display:block;
    cursor:pointer;
    114px;
    text-align:center;
    color:#949694;
    font-weight:bold;
    }
    .Menubox li.hover{
    padding:0px;
    background:#fff;
    116px;
    border-left:1px solid #A8C29F;
    border-top:1px solid #A8C29F;
    border-right:1px solid #A8C29F;
    background:url(http://www.makewing.com/images/uppic/200801081249070.gif);
    color:#739242;
    font-weight:bold;
    height:27px;
    line-height:27px;
    }
    .Contentbox{
    clear:both;
    margin-top:0px;
    border:1px solid #A8C29F;
    border-top:none;
    height:181px;
    text-align:center;
    padding-top:8px;
    }
    -->
    </style>
    <script>
    <!--
    /*第一种形式 第二种形式 更换显示样式*/
    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?"hover":"";
    con.style.display=i==cursel?"block":"none";
    }
    }
    //-->
    </script>
    </head>
    <body>
    <br><br>

    <div id="Tab2">
    <div class="Menubox">
    <ul>
    <li id="two1"  onmouseover="setTab('two',1,5)"  class="hover">新闻1</li>
    <li id="two2" onmouseover="setTab('two',2,5)" >新闻2</li>
    <li id="two3" onmouseover="setTab('two',3,5)">新闻3</li>
    <li id="two4" onmouseover="setTab('two',4,5)">新闻4</li>
    <li id="two5" onmouseover="setTab('two',5,5)">新闻5</li>
    </ul>
    </div>
    <div class="Contentbox">
    <div id="con_two_1" >"<%=ShowBehindInfo("chenliang")%>"</div>
    <div id="con_two_2" style="display:none">新闻列表2</div>
    <div id="con_two_3" style="display:none">新闻列表3</div>
    <div id="con_two_4" style="display:none">新闻列表4</div>
    <div id="con_two_5" style="display:none">新闻列表5</div>
    </div>
    </div>
    </body>
    </html>

  • 相关阅读:
    51nod 1284:2 3 5 7的倍数 容斥原理
    POJ 2006:Litmus Test 化学公式
    POJ 2039:To and Fro
    POJ 2014:Flow Layout 模拟水题
    南阳722--数独(Dfs)
    Poj2377--Bad Cowtractors(最大生成树)
    并查集知识点总结
    Poj1861--Network(最小生成树)
    杭电2824--The Euler function(欧拉函数)
    杭电1284--钱币兑换问题(有趣)
  • 原文地址:https://www.cnblogs.com/jcomet/p/1310786.html
Copyright © 2011-2022 走看看