How To Create Simple Web Page and Navigation bar || And Text Animation Project html, Css Code
HTML CODE
<header>
<nav>
<div class="navbar">
<div class="logo">
<img src="/20240318_124252.png" alt="">
</div>
<ul class="menu">
<li><a href="#">Home</a></li>
<li><a href="#">latest</a></li>
<li><a href="#">Category</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
<div class="search-box">
<input type="text" placeholder="Search here...">
<a href="#"><i class="fas fa-search"></i></a>
</div>
</div>
</nav>
<div class="content">
<div class="text-content">
<div class="text">Hello, It's Me</div>
<div class="name">Code with angry</div>
<div class="job">
<span>And, I'm a</span>
<div class="typing-text">
<span>Youtuber,</span>
<span>Coder.</span>
</div>
</div>
<div class="buttons">
<button>About Me</button>
<button>Follow Me </button>
</div>
</div>
</div>
<div class="girl">
<img src="" alt="">
</div>
</header>
</body>
CSS CODE
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins',sans-serif;
}
header{
height:100vh;
width: 100%;
background: url(/20240318_124509.png);
background-position: center;
background-repeat: no-repeat;
}
header nav{
position: fixed;
left: 0;
top: 0;
width:100%
}
nav .navbar{
width: 90%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px auto 20px auto;
}
.navbar .logo{
height: 80px;
width: 150px;
}
.navbar .logo img{
height: 100%;
width: 100%;
object-fit: contain;
}
.navbar .menu{
display: flex;
}
.navbar .menu li{
list-style: none;
margin: 0 10px;
}
.menu li a{
font-size: 17px;
color: #2c3e50;
font-weight: 500;
text-decoration: none;
}
.menu li a:hover{
color: #000;
}
.navbar .search-box{
position: relative;
height: 50px;
width: 150px;
}
.search-box input[type="text"]{
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
color: #2c3e50;
font-size: 18px;
outline: none;
border: 2px solid #2c3e50;
border-radius: 8px;
padding: 0 10px 0 40px;
}
.search-box a{
position: absolute;
left: 10px;
top: 50%;
transform: translate(-50%);
font-size: 20px;
color: #2c3e50;
padding:0 5px 0 0;
border-right: 2px solid #2c3e50;
}
.content{
position: absolute;
top: 35%;
left: 7%;
}
.content .text {
padding-bottom: 5px;
font-size: 29px;
color: #2c3e50;
}
.content .name {
font-size:75px;
color: #2c3e50;
margin: -20px 0 0 -3px;
}
.content .job{
font-size: 40px ;
color: #2c3e50;
display: flex;
}
.content .job .typing-text{
color: #1de2d1;
margin-left: 10px;
white-space: nowrap;
overflow: hidden;
border-right: 4px solid #1de2d1;
animation: typing 5s steps(15) infinite;
/*background: red;*/
}
@keyframes typing {
0%{
width: 0ch;
}
50%{
width: 15ch;
}
100%{
width: 0ch;
}
}
.content .buttons{
margin: 20px 0 0 50px;
}
.content .buttons button{
color: #fff;
margin: 0 10px;
padding: 8px 16px;
font-size: 18px;
cursor: pointer;
border-radius: 6px;
outline: none;
border: none;
background: linear-gradient(135deg, #2afadf 10%, #c346c2 100%);
transition: all 0.3 ease;
}
.content .buttons button:hover{
transform: scale(0.98);
}
</style>
</html>
Comments
Post a Comment