flex 小案例




    
    
    Document
    



    
    
    
    
我的邮箱
我的邮箱
我的邮箱
我的邮箱
我的邮箱
* { 
    font-family: Arial; 
    font-size: 14px; 
    margin: 0; 
    padding: 0; 
    border: none; 
}
a { text-decoration: none; }
ul { list-style: none; }

html,body{
    width: 100%;
    height: 100%;
}
body{
    background-image: url(../images/bg.jpg) ;
    background-size: cover;
    background-repeat: no-repeat;
}

/* page header */
.page-header{
    height: 70px;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    align-items: center;
}
.page-header ul{
    display: flex;
}
.page-header li{
    color:#fff;
    border:1px solid #fff;
    border-radius: 8px;
    padding:10px;
    margin:0 10px
}
.page-header li a{
    color:#fff;
}

/* 内容区 */
.page-content{
   
    background-color: pink;
    height: calc(100vh - 70px);
    /* height: calc(100vh - 70px); */
    display: flex;
    align-items: center;
    justify-content: center;
}
.content-nav{
    display: flex;
    width: 1000px;
    height: 300px;
    background-color: aquamarine;
    justify-content: space-evenly;
    align-items: center;
    transition: 0.2s linear;

}
.content-nav .item{
    width: 180px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    color:#fff;
    transition: 0.2s linear;

  
}
.content-nav .item:hover{
    box-shadow:  0px 0px 20px black;
}

.page-content .content-nav .item:nth-child(1){
    background-color: #595CA8; ;
}
.page-content .content-nav .item:nth-child(2){
    background-color: #FF9D2E; ;
}
.page-content .content-nav .item:nth-child(3){
    background-color: #01A6DE; ;
}
.page-content .content-nav .item:nth-child(4){
    background-color: #015E91; ;
}
.page-content .content-nav .item:nth-child(5){
    background-color: #1DC128; ;
}

flex 小案例_第1张图片

你可能感兴趣的:(css,案例,html,css,前端)