这种方法同样可以实现,哪个方法更好一点

来源:3-3 企业网站制作之页面头部制作(二)

慕容2411582

2017-07-19 15:42

<div id="logo">
    <div id="logo-right">
        <span class="hotline">24小时服务热线:</span>
        <span class="tel">123-456-7890 </span>
    </div>
</div><!--logo结束-->


/* logo区域*/
#logo{
    height: 80px;
    background: #FFF url(../images/logo.jpg) no-repeat left center;
}
#logo-right{
    width: 300px;
    height: 80px;
    background: url(../images/tel.jpg) no-repeat left center;
    float: right;
}
#logo-right span{
    font-family: 微软雅黑;
}
#logo-right span.hotline{
    margin-left: 40px;
    line-height: 80px;
}
#logo-right span.tel{
    color: red;
    font-size: 22px;
}


写回答 关注

1回答

  • 被遗忘的高木公
    2017-07-20 10:23:16

    <style type="text/css">

    a{

    margin:5px;

    padding:5px 10px;

    }

    a:link,a:visited{

    text-decoration:none;

    color:#000000;

    }

    a:hover,a:active{

    background:#F7090D;

    }

    </style>



    <body>

    <a href="#">首页</a>&lt;

    <a href="#">1</a>

    <a href="#">2</a>

    <a href="#">3</a>

    <a href="#">...</a>&gt;

    <a href="#">尾页</a>

    </body>


企业网站综合布局实战

本课程重点介绍HTML/CSS实现常见企业网站布局的方法

157081 学习 · 2157 问题

查看课程

相似问题