<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 閱讀(937) 評論(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
    主站蜘蛛池模板: rh男男车车的车车免费网站| 天黑黑影院在线观看视频高清免费| 亚洲成在人线av| 国产在线国偷精品产拍免费| 在线观看免费黄色网址| 在线亚洲v日韩v| 国产精品亚洲专区在线观看| 久久精品国产亚洲AV网站| 亚洲人成影院在线观看 | 国产亚洲精品资在线| 在线免费观看a级片| 99久久国产免费中文无字幕| 一个人看的www免费在线视频| 亚洲精品无码久久久久久| 亚洲国产午夜精品理论片| 久久久综合亚洲色一区二区三区 | 亚洲乱码一区二区三区国产精品| 亚洲av无码一区二区三区网站| 亚洲&#228;v永久无码精品天堂久久 | 免费在线看黄网站| 精精国产www视频在线观看免费| 狼色精品人妻在线视频免费| 亚洲日韩AV无码一区二区三区人| 亚洲伊人久久大香线蕉啊| 亚洲视频在线视频| 亚洲av综合av一区| 亚洲精品国产品国语在线| 亚洲中文字幕第一页在线| 国产成人亚洲精品影院| 亚洲性久久久影院| 中文字幕亚洲日韩无线码| 亚洲国产成人VA在线观看| 成年大片免费视频| 成年人在线免费观看| 好爽…又高潮了免费毛片| 女人18毛片特级一级免费视频 | 亚洲av综合avav中文| 亚洲人成在线观看| 亚洲最大免费视频网| 67194在线午夜亚洲| 亚洲中文字幕精品久久|