<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    gembin

    OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

    HBase, Hadoop, ZooKeeper, Cassandra

    Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

    There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

    About Me

     

    CSS頁碼效果


    不知道網上有沒有做成這樣的,純粹是不小心做出來的。
    最終效果說明:
    頁面結構是這樣的

    <li><a href="#">1</a></li>
    最終看到的彩色下劃線是根據li的背景色顯示出來的
    li{background:#f60;}

    而鼠標移上去的色彩變化是根據

    a:hover{background:#f93}
    當然關鍵的地方在于
    li{width:20px;height:20px}

    定義li的高度時由于沒有定義line-height:20px,所以會造成a標簽在顯示時下方會留空幾個像素。正在由于這個錯誤,無意中產生了這個效果

    請運行下段代碼看效果。

    以下為源代碼 你可先修改部分代碼,再測試:
    <!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" lang="gb2312">
        
    <head>
            
    <title></title>
            
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

            
    <style type="text/css">
                body
    {
                    font-size
    :62.5%;
                
    }
                h1
    {
                    font-size
    :1.4em;
                
    }
                h2
    {
                    clear
    :both;
                    font-size
    :1.2em;
                
    }
                #pageClass
    {
                    clear
    :both;
                    font-size
    :1.2em;
                
    }
                #pageClass ul
    {
                    list-style
    :none;
                
    }
                #pageClass li
    {
                    float
    :left;
                    width
    :20px;
                    height
    :20px;
                    line-height
    :20px;
                    border
    :1px solid silver;
                    margin
    :0 3px;
                
    }
                #pageClass a
    {
                    display
    :block;
                    text-align
    :center;
                
    }
                #pageClass a:link,#pageClass a:visited
    {
                    background
    :white;
                    text-decoration
    : none;
                    color
    :gray;
                
    }
                #pageClass a:hover,#pageClass a:active
    {
                    text-decoration
    : none;
                    background
    :gray;
                    color
    :white;
                
    }

            
    /*第二個效果*/
                #pageClass2
    {
                    clear
    :both;
                    font-size
    :1.2em;
                
    }
                #pageClass2 ul
    {
                    list-style
    :none;
                
    }
                #pageClass2 li
    {
                    float
    :left;
                    width
    :20px;
                    height
    :20px;
                    border
    :1px solid silver;
                    margin
    :0 3px;
                
    }
                #pageClass2 a
    {
                    display
    :block;
                    text-align
    :center;
                
    }
                #pageClass2 a:link,#pageClass2 a:visited
    {
                    background
    :white;
                    text-decoration
    : none;
                    color
    :gray;
                
    }
                #pageClass2 a:hover,#pageClass2 a:active
    {
                    text-decoration
    : none;
                    background
    :gray;
                    color
    :white;
                    line-height
    :14px;
                
    }
            
    /*第三個效果*/
                #pageClass3
    {
                    clear
    :both;
                    font-size
    :1.2em;
                
    }
                #pageClass3 ul
    {
                    list-style
    :none;
                
    }
                #pageClass3 li
    {
                    float
    :left;
                    width
    :20px;
                    height
    :20px;
                    border
    :1px solid silver;
                    background
    :#f60;
                    margin
    :0 3px;
                
    }
                #pageClass3 a
    {
                    display
    :block;
                    text-align
    :center;
                    line-height
    :16px;
                
    }
                #pageClass3 a:link,#pageClass3 a:visited
    {
                    background
    :white;
                    text-decoration
    : none;
                    color
    :gray;
                
    }
                #pageClass3 a:hover,#pageClass3 a:active
    {
                    text-decoration
    : none;
                    background
    :#f93;
                    color
    :white;
                    line-height
    :16px;
                    
    }
            
    </style>
        
    </head>

        
    <body>
            
    <h1>頁碼效果</h1>
            
    <h2>這是我原本想要去做的效果</h2>
            
    <div id="pageClass">
                
    <ul>
                    
    <li><href="#3">1</a></li>
                    
    <li><href="#4">2</a></li>
                    
    <li><href="#5">3</a></li>
                    
    <li><href="#6">4</a></li>
                    
    <li><href="#8">5</a></li>
                    
    <li><href="#9">6</a></li>
                    
    <li><href="http://www.iwcn.net/default.asp">7</a></li>
                
    </ul>
            
    </div>
            
    <h2>做完之后成這樣了</h2>
            
    <div id="pageClass2">
                
    <ul>
                    
    <li><href="#3">1</a></li>
                    
    <li><href="#4">2</a></li>
                    
    <li><href="#5">3</a></li>
                    
    <li><href="#6">4</a></li>
                    
    <li><href="#8">5</a></li>
                    
    <li><href="#9">6</a></li>
                    
    <li><href="http://www.iwcn.net/default.asp">7</a></li>
                
    </ul>
            
    </div>
            
    <h2>改了改成這樣了</h2>
            
    <div id="pageClass3">
                
    <ul>
                    
    <li><href="#3">1</a></li>
                    
    <li><href="#4">2</a></li>
                    
    <li><href="#5">3</a></li>
                    
    <li><href="#6">4</a></li>
                    
    <li><href="#8">5</a></li>
                    
    <li><href="#9">6</a></li>
                    
    <li><href="">7</a></li>
                
    </ul>
            
    </div>
        
    </body>
    </HTML>

    posted on 2008-03-26 14:05 gembin 閱讀(929) 評論(0)  編輯  收藏 所屬分類: HTML

    導航

    統計

    常用鏈接

    留言簿(6)

    隨筆分類(440)

    隨筆檔案(378)

    文章檔案(6)

    新聞檔案(1)

    相冊

    收藏夾(9)

    Adobe

    Android

    AS3

    Blog-Links

    Build

    Design Pattern

    Eclipse

    Favorite Links

    Flickr

    Game Dev

    HBase

    Identity Management

    IT resources

    JEE

    Language

    OpenID

    OSGi

    SOA

    Version Control

    最新隨筆

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    free counters
    主站蜘蛛池模板: 亚洲日产乱码一二三区别| 一级特黄a大片免费| 国产成人免费a在线视频app| 免费又黄又爽又猛大片午夜| 国产亚洲AV夜间福利香蕉149| 最刺激黄a大片免费网站| 亚洲色一区二区三区四区| 久久久久亚洲av毛片大| 最好看的中文字幕2019免费| 偷自拍亚洲视频在线观看99| 亚洲电影国产一区| 国产国产人免费人成免费视频| 在线免费观看伊人三级电影| 一本色道久久88亚洲精品综合| 久久精品亚洲男人的天堂| 日韩国产免费一区二区三区| gogo免费在线观看| 国产午夜亚洲精品| 亚洲AV无码国产在丝袜线观看| 免费鲁丝片一级在线观看| 大地资源在线资源免费观看| 亚洲经典千人经典日产| 亚洲国产精品免费视频| 亚洲人成电影在线播放| 免费人成视频在线| 亚洲欧洲免费视频| 一本久久免费视频| 亚洲欧美日韩久久精品| 久久久久亚洲AV无码麻豆| 亚洲人成国产精品无码| 国产精品色午夜视频免费看| 亚洲精品在线免费观看视频| 国产免费区在线观看十分钟| 精品无码专区亚洲| 亚洲一区二区三区精品视频 | 免费A级毛片无码A| 亚洲高清中文字幕免费| 无码精品一区二区三区免费视频| 免费人成网上在线观看| 亚洲美国产亚洲AV| 亚洲午夜一区二区三区|