发表于: 2020-06-20 22:01:58

1 1370


今天完成的事情:

完成了任务14的头尾和下拉框组件

完成效果:

下拉框html代码:

<div class="title">
            <div class="container title">
                <div class="row title">
                    <div class="col">
                        <img src="../14w/葡萄藤.png">
                    </div>
                    <div class="col link">
                        <a class="title-a" href="#">关于</a>
                        <a class="title-a" href="#">推荐</a>
                        <a class="title-a" href="#">职业</a>
                        <a class="title-a" href="#">首页</a>
                    </div>
                    <div class="col btn">
                        <label for="menu">
                            <div></div>
                            <div></div>
                            <div></div>
                        </label>
                    </div>
                </div>
            </div>
            <input type="checkbox" id="menu">
            <div class="link-1">
                <div>
                    <a class="title-a1" href="#">首页</a>
                </div>
                <div>
                    <a class="title-a1" href="#">职业</a>
                </div>
                <div>
                    <a class="title-a1" href="#">推荐</a>
                </div>
                <div>
                    <a class="title-a1" href="#">关于</a>
                </div>
            </div>
        </div>
    </header>

css代码:

.title{
    height70px;
    background: #29b078;
}
.title img{
    height45px;
    margin-top12px;
}
.title .link{
    padding-right0;
}
a{
    text-decoration: none;
    color:#fff;
}
.title .title-a{
    height67px;
    width70px;
    font-size14px;
    text-align: center;
    line-height67px;
    float: right;
}
@media(max-width:991px) {
    .link{
        display: none;
    }
}
.title .title-a:hover{
    border-bottom3px solid #fff;
}
.title .btn{
    display: none;
}
.title label{
    width55px;
    height40px;
    margin-top:15px;
    border1px solid #4f4f4f;
    border-radius5px;
    background: #29b078;
    float: right;
}
.title label div{
    width30px;
    height3px;
    margin7px auto 0;
    border-radius5px;
    background: #4f4f4f;
}
label:hover{
    background: #269869;
}
@media(max-width:991px){
    .title .btn{
        display: block;
    }
}
.link-1{
    text-align: center;
    background: #29b078;
    display: none;
}
.title .link-1 div{
    height67px;
    width70%;
    margin: auto;
    font-size14px;
    line-height67px;
    border-bottom3px solid #29b078;
}
.title .link-1 div:hover{
    border-bottom3px solid #fff;
}
input[type="checkbox"] {display: none;}
input[type="checkbox"]:checked.link-1{
    display: block;
}



返回列表 返回列表
评论

    分享到