Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Header 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

https://qwertyqwerty01764438421.github.

io/header4/
https://qwertyqwerty01764438421.github.io/fullportfoliowebsite/1.html
HEADER 4
<!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>Document</title>
<!-- cdnjs -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzP
JQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="header4.css">
</head>
<body>
<header>
<nav>
<div class="logoo"><a href="" class="logo">SI<span>YAM</span></a>
</div>
<div class="nav_links" id="nav_links">
<i class="fa-solid fa-circle-xmark" onclick="hidemenu()"></i>
<ul >

<li><a href="#">HOME</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">COURSES</a></li>
<li><a href="#">SERVICES</a></li>
<li><a href="#">Work</a></li>
</ul>

</div>
<!-- OPENMENU -->
<i class="fa-sharp fa-solid fa-bars" onclick="openmenu()"></i>
<div class="contact">
<a href="#" ><button class="btn1">CONTACT US </button></a>
<a href="mailto:qq5309227@gmail.com" class="btn2">qq5309227@gmail.com</a>
</div>

</nav>
</header>

<script>
const nav_links=document.getElementById("nav_links");
function openmenu(){
nav_links.style.right="0";
}
function hidemenu(){
nav_links.style.right="-200px";
}
</script>
</body>
</html>
CSS
@import
url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,50
0;1,700;1,900&display=swap');
*{
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
}
html{
scroll-behavior: smooth;
}
a,li,button{
text-decoration: none;
list-style: none;
color: beige;
font-size: 16px;
font-weight: 400;
}
header{
height: 100vh;
width: 100%;
background: linear-gradient(rgba(9, 20, 65, 0.5),rgba(4,9,30,.7)),url(./eduford_img/banner2.jpg);
background-position: center;
background-size: cover;
}
nav{
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 10%;
}
.logo{
width: 150px;
font-size: 30px;
}
.logo span{
color: orangered;
}
ul{}
ul li{
display: inline-block;
padding: 9px 20px;
}
ul li a{
}
ul li::after{
content: '';
width: 70%;
height: 3px;
color: red;
background-color: red;
display: block;
margin: auto;
transition: .5s;
}
ul li:hover::after{
width: 100%;
}
.contact {
margin-left: -23px;
text-align: right;
}
.btn1{
display: block;
background-color: rgb(38, 82, 82);
padding: 10px 25px;
border: none;
border-radius: 50px;
transition: all .5s ease 0s;
}
.btn1:hover{
background-color: rgba(38, 82, 82,0.5);
transform: translateY(5px);
}
.btn2:hover{
color: rgba(245, 98, 0, 0.5);
}
.fa-solid{
display: none;
}
/* responsive */
@media(max-width:1050px){
.nav_links li {
display: inline-block;
padding: 4px 11px;
}
.contact {
margin-left: -17px;
text-align: right;
position: absolute;
top: 50%;
left: 10%;
}
}
@media(max-width:700px){

}
@media(max-width:650px){
ul li::after {

display: none;

}
.nav_links ul li{
display: block;
list-style: none;
padding: 8px 12px;
position: relative;
}
.nav_links {
position: fixed;
background-color: #f44336;
top: 0;
right: -200px;
transition: 1s;
height: 100vh;
width: 200px;
text-align: left;
z-index: 2;
}
nav .fa-solid{
display: block;
color: #fff;
margin: 10px;
font-size: 22px;
cursor: pointer;
}
}

You might also like