CSS布局练习

CSS布局练习_第1张图片



    
    
    Page Title
    
    


    
This is Content 1
MaybeContent 2
Content 3
Content 4
Content 5
Content 6
Content 7
Content 8
Content 9
Content 10
© 2018 ife.baidu.com

* {
    font-family: "Microsoft YaHei";
}

header {
    width: 100%;
    background-color: black;
}

#banner {
    background-color: rgb(153, 204, 51);
    width: 100%;
    height: 200px;
}

#haha {
    width: 960px;
    height: 200px;
    margin: 0 auto;
}

#hahaha {
    width: 100px;
    height: 20px;
    float: right;
    display: flex;
    justify-content:center;
    align-items:center;
    margin-top: 175px;
}

.click {
    text-align: center;
    width: 15px;
    height: 20px;
    margin-left: 5px;
    border-left: 1px solid gray;
    border-right: 1px solid gray;
    background-color: rgb(208, 243, 202);
}

footer {
    width: 100%;
    height: 100px;
    background-color: gray;
    text-align: center;
    color: white;
}

nav {
    width: 100%;
    height: 75px;
    border-bottom: 1px solid gray;
}

nav > div {
    width: 960px;
    height: 75px;
    margin: 0 auto; 
    font-size: 0;
}

nav div div {
    display: inline-block;
    border: 1px solid gray;
    border-bottom: none;
    height: 50px;
    width: 100px;
    text-align: center;
    line-height: 50px;
    margin-top: 25px;
    font-size: 16px;
    border-top-left-radius: 1.5em;
    border-top-right-radius: 1.5em;
}

main {
    width: 960px;
    margin: 0 auto;
}

.flex1 {
    display: flex;
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: space-between;
}

.flex2 {
    display: flex;
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: space-between;
}

.content {
    text-align: center;
    padding: 80px;
    border: 1px solid gray;
    flex-grow: 1;
}

#logo {
    width: 960px;
    height: 75px;
    margin: 0 auto;
}

header h2 {
    color: white;
    float: left;
}

header > div > div{
    color: white;
    float: right;
}

a {
    text-decoration: underline;
}


你可能感兴趣的:(CSS)