美文网首页
五彩导航条

五彩导航条

作者: Yuann | 来源:发表于2017-06-14 19:22 被阅读0次
    五彩导航条

    5个a,给a添加背景图片即可

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                a{
                    width: 120px;
                    height: 58px;
                    display: inline-block;
                    text-align: center;
                    text-decoration: none;
                    font:  700 17px/50px "微软雅黑";
                }
                .one{
                    background-image: url(images/bg1.png);
                }
           .two{
                    background-image: url(images/bg2.png);
                }   .three{
                    background-image: url(images/bg3.png);
                }   .for{
                    background-image: url(images/bg4.png);
                }
            </style>
        </head>
        <body>
            <a href="#" class="one">五彩导航条</a>
    <a href="#" class="two">五彩导航条</a>
    <a href="#"class="three">五彩导航条</a>
    <a href="#" class="three">五彩导航条</a>
    <a href="#" class="for">五彩导航条</a>
        </body>
    </html>
    

    中间有空隙是因为a在不同的行中,让a在同一行即可

    五彩导航条
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                a{
                    width: 120px;
                    height: 58px;
                    display: inline-block;
                    text-align: center;
                    text-decoration: none;
                    font:  700 17px/50px "微软雅黑";
                }
                .one{
                    background-image: url(images/bg1.png);
                }
           .two{
                    background-image: url(images/bg2.png);
                }   .three{
                    background-image: url(images/bg3.png);
                }   .for{
                    background-image: url(images/bg4.png);
                }
            </style>
        </head>
        <body>
            <a href="#" class="one">五彩导航条</a><a href="#" class="two">五彩导航条</a><a href="#"class="three">五彩导航条</a><a href="#" class="three">五彩导航条</a><a href="#" class="for">五彩导航条</a>
        </body>
    </html>
    

    相关文章

      网友评论

          本文标题:五彩导航条

          本文链接:https://www.haomeiwen.com/subject/gbjeqxtx.html