parent
b2d5a7d349
commit
1846ebc5ca
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 457 B |
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name = "viewport" content="width=device-widyh, intial-scale=1.0">
|
||||
<title>A Mordern Website Using HTML CSS & JavaScript</title>
|
||||
<link rel="stylesheet" href="style.css"
|
||||
</head>
|
||||
<body>
|
||||
<div class="hero">
|
||||
<nav>
|
||||
<img src="images/menu.png" class="menu-img">
|
||||
<img src="images/logo.png" class="logo">
|
||||
<ul>
|
||||
<li><a href="">Latest</a></li>
|
||||
<li><a href="">Modern</a></li>
|
||||
<li><a href="">Contemporary</a></li>
|
||||
<li><a href="">Affordable</a></li>
|
||||
</ul>
|
||||
<button type="button" onclick="togglebtn()" id="btn"><span></span></button>
|
||||
</nav>
|
||||
|
||||
<div class="lamp-container">
|
||||
<img src="Images/lamp.png" class="lamp">
|
||||
<img src="Images/light.png" class="light" id="light">
|
||||
</div>
|
||||
|
||||
<div class="text-cointerner">
|
||||
<h1>A Mordern Website Using <b>HTML</b> <b>CSS</b> & <b>JavaScript</b></h1>
|
||||
<a href="">Check All Collection</a>
|
||||
<div class="control">
|
||||
<p>04</p>
|
||||
<div class="line"><span></span></div>
|
||||
<p>05</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var btn = document.getElementById("btn");
|
||||
var light = document.getElementById("light");
|
||||
function togglebtn(){
|
||||
btn.classList.toggle("active");
|
||||
light.classList.toggle("on");
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,126 @@
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: cursive;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.hero{
|
||||
background: #1d2026;
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
}
|
||||
nav{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 8%;
|
||||
}
|
||||
nav .menu-img{
|
||||
width: 25px;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
nav .logo{
|
||||
width: 160px;
|
||||
cursor: pointer;
|
||||
}
|
||||
nav ul{
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
nav ul li{
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
margin: 0 20px;
|
||||
}
|
||||
nav ul li a{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
button{
|
||||
background: #efefef;
|
||||
height: 30px;
|
||||
width: 60px;
|
||||
border-radius: 20px;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
pointer: cursor;
|
||||
transition: background 0.5s;
|
||||
}
|
||||
button span{
|
||||
display: block;
|
||||
background: #999;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
border-radius: 50%;
|
||||
margin-left: 2px;
|
||||
transition: background 0.5s, margin-left 0.5s;
|
||||
}
|
||||
.lamp-container{
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
left: 22%;
|
||||
width: 200px;
|
||||
}
|
||||
.lamp{
|
||||
width: 100%;
|
||||
}
|
||||
.light{
|
||||
position: absolute;
|
||||
top: 98%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 700px;
|
||||
margin-left: -10px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
.text-cointerner{
|
||||
max-width: 600px;
|
||||
margin-top: 7%;
|
||||
margin-left: 50%;
|
||||
}
|
||||
.text-cointerner a{
|
||||
text-decoration: none;
|
||||
background: #00986f;
|
||||
padding: 14px 40px;
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
margin-top: 30px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
.control{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin-top: 150px;
|
||||
}
|
||||
.control .line{
|
||||
width: 250px;
|
||||
height: 4px;
|
||||
background: #fff;
|
||||
margin: 0 20px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.control .line span{
|
||||
width: 50%;
|
||||
height: 8px;
|
||||
margin-top: -2px;
|
||||
border-radius: 4px;
|
||||
background: #00986f;
|
||||
display: block;
|
||||
}
|
||||
.active{
|
||||
background: red;
|
||||
}
|
||||
.active span{
|
||||
background: #fff;
|
||||
margin-left: 31px;
|
||||
}
|
||||
.on{
|
||||
opacity: 1;
|
||||
}
|
Loading…
Reference in new issue