Tugas PWEB 2
Tugas 2: Landing Page
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tur-U</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <div class="navbar"> <img src="images/logo.png" class="logo"> <h1>Tur-U</h1> <nav> <ul> <li><a href="">Home</a></li> <li><a href="">Browse Mattress</a></li> <li><a href="">Take The Quiz</a></li> <li><a href="">Others</a></li> </ul> </nav> <img src="images/menu-icon.png" class="menu-icon"> </div> <div class="row"> <div class="col-1"> <h2>SPECIAL OFFER</h2> <h3>SleepX Ortho Plus Quilted 6 inch King Mattress</h3> <p>Memory Foam L x W: 72 inch x 70 inch</p> <h3>Rp900.000 40% OFF!</h3><s><h4>Rp1.500.000</h4></s> <button type="button">Buy Now<img src="images/doublearrow.png"> </button> </div> <div class="col-2"> <img src="images/mattress.png" class="mattress"> <div class="color-box"></div> <div class="add-btn"> <img src="images/plus.png"> <p><small>Add to Cart</small></p> </div> </div> </div> <div class="social-links"> <img src="images/fb.png"> <img src="images/tw.png"> <img src="images/ig.png"> </div> </div> </body> </html>
CSS
*{
margin:0;
padding:0;
font-family: sans-serif;
}
.container{
width: 100%;
min-height: 100vh;
padding-left: 8%;
padding-right: 8%;
box-sizing: border-box;
overflow: hidden;
}
.navbar{
width: 100%;
display: flex;
align-items: center;
text-align: left;
}
.navbar h1{
list-style: none;
display: inline-block;
font-size: 20;
color: black;
}
.logo{
width: 50px;
cursor: pointer;
margin: 30px 0;
}
.menu-icon{
width: 25px;
cursor: pointer;
}
nav{
flex: 1;
text-align: right;
}
nav ul li{
list-style: none;
display: inline-block;
margin-right: 30px;
}
nav ul li a{
text-decoration: none;
color: #000;
font-size: 14px;
}
nav ul li a:hover{
color: #3600fa;
}
.row{
display: flex;
justify-content: space-between;
align-items: center;
margin: 100px 0;
}
.col-1{
flex-basis: 40%;
position: relative;
margin-left: 50px;
}
.col-1 h2{
font-size: 54px;
}
.col-1 h3{
font-size: 30px;
font-weight: 100;
margin: 20px 0 10px;
}
.col-1 p{
font-size: 16px;
color: #b7b7b7;
font-weight: 100;
}
.col-1 h4{
margin: 10px 0;
color: #707070;
font-size: 20px;
}
button{
width: 140px;
border: 0;
padding: 12px 10px;
outline: none;
color: #fff;
background: linear-gradient(to right, #fb5823, #ff3527);
border-radius: 6px;
cursor: pointer;
transition: width 0.5s;
}
button img{
width: 30px;
display: none;
}
button:hover img{
display: block;
color: white;
}
button:hover{
width: 160px;
display: flex;
align-items: center;
justify-content: space-between;
}
.col-1::after{
content:'';
width: 10px;
height: 57%;
background: linear-gradient(#ff469f, #ff6062);
position: absolute;
left: -40px;
top: 8px;
}
.col-2{
position:relative;
flex-basis: 60%;
display: flex;
align-items: center;
}
.col-2 .mattress{
width: 90%;
}
.color-box{
position: absolute;
right:0;
top:0;
background: linear-gradient(#ff54a2, #ff575a);
border-radius: 20px 0 0 20px;
height: 100%;
width: 90%;
z-index: -1;
transform: translateX(150px);
}
.add-btn img{
width:35px;
margin-bottom: 5px;
}
.add-btn{
text-align: center;
color: white;
cursor: pointer;
}
.social-links img{
height: 13px;
margin: 20px;
cursor: pointer;
}
.social-links{
text-align: center;
}
Komentar
Posting Komentar