100-project-100-days-website/100_projects/15-netflix-mobile-navigation-animation/css/style.css

172 lines
2.9 KiB
CSS
Raw Normal View History

2023-03-08 11:17:02 +03:00
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Muli';
background: url(../header.jpg);
background-size: cover;
background-repeat: no-repeat;
display: flex;
align-items: center;
flex-direction: column;
height: 100vh;
position: relative;
}
body::after{
content: '';
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .4);
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.nav{
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 20px 40px;
}
.nav div button{
background-color: #E50914;
color: #fff;
border: none;
padding: 9px 12px;
font-size: 17px;
}
.nav .btns1{
display: flex;
gap: 15px;
}
.nav div select{
background-color: #000;
color: #fff;
border: 1px solid #fff;
padding: 6px 12px;
font-size: 17px;
text-align: center;
}
.netflix-logo{
text-align: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.netflix-text {
text-transform: uppercase;
color: #fff;
font-size: 24px;
font-weight: 800;
}
.netflix-nav-btn {
border: 0;
background: transparent;
cursor: pointer;
font-size: 20px;
}
.netflix-open-btn {
color: #fff;
font-size: 26px;
transition: .3s;
}
.netflix-open-btn:hover{
opacity: .8;
}
.netflix-close-btn {
position: absolute;
top: 40px;
right: 30px;
background: #fff;
padding: 3px 7px;
border-radius: 3px;
transition: .3s;
}
.netflix-close-btn:hover{
color: #F40612;
}
.netflix-nav {
position: fixed;
top: 0;
left: 0;
height: 100vh;
transform: translateX(-100%);
transition: transform .3s ease-in-out;
}
.netflix-nav.visible {
transform: translateX(0);
}
.netflix-nav-black {
background-color: #000;
padding: 40px;
position: relative;
transition-delay: 0s;
width: 95%;
}
.netflix-nav-black.visible {
transition-delay: .4s;
}
.netflix-nav-white {
background-color: #fff;
width: 60%;
max-width: 480px;
min-width: 320px;
transition-delay: .4s;
}
.netflix-nav-white.visible {
transition-delay: 0s;
}
.netflix-nav-red {
background-color: #F40612;
transition-delay: .2s;
width: 95%;
}
.netflix-nav-red.visible {
transition-delay: .2s;
}
.logo {
max-width: 100%;
}
.logo-menu{
width: 200px;
}
.netflix-list {
list-style-type: none;
padding: 0;
}
.netflix-list li {
margin: 20px 0;
}
.netflix-list li a {
color: #fff;
font-size: 17px;
text-decoration: none;
text-transform: uppercase;
position: relative;
}
.netflix-list li a:hover{
color: #F40612;
}
@media (min-width:768px){
.netflix-list li a::after{
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 0;
height: 1px;
background: #F40612;
transition: .3s;
}
.netflix-list li a:hover::after{
width: 100%;
}
}
.netflix-list ul {
list-style-type: none;
padding-left: 20px;
}