为什么标签设置透明度会影响其他标签?

<style type="text/css">

.header{

    height: 40px;

    width:100%;

    position: fixed;

}

.header_bg{

    height: 40px;

    width:100%;

    opacity: 0.3;

    background:#000;

}

.header .nav{

    display: inline-block;

    margin-top: -40px;

    float: right;

}

.header .nav a{

    padding-right: 20px;

    color:#fff;

    font-size: 14px;

    line-height: 40px;

}

</style>


<div class="header">

    <div>

        <div class="header_bg"></div>

    </div>

    <div class="nav">

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

        <a href="#">新闻</a>

        <a href="#">贴吧</a>

    </div>

</div>


此处留白
浏览 987回答 1
1回答

聪明的汤姆

影响了什么..
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Html5
CSS3