JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<link rel="icon" type="image/png" href="/favicon.png"/>
<title>ModBot | Home</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<a href="#" class="logo">ModBot</a>
<ul>
<li><a href="#" class="active">Home</a></li>
<li><a href="#">Features</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">Team</a></li>
<li><a href="#" class="invite">Invite</a></li>
</ul>
</header>
<div class="h2-parent">
<h2 data-text="Improve your Server...">Improve your Server...</h2>
<div class="abs-h2">
<h2 data-text="Improve your Server...">Improve your Server...</h2>
</div>
</div>
<section>
<div class="row">
<div>
<i class="fa fa-microchip" aria-hidden="true"></i>
<i class="fa fa-file-code-o" aria-hidden="true"></i>
<i class="fa fa-database" aria-hidden="true"></i>
<i class="fa fa-server" aria-hidden="true"></i>
<i class="fa fa-terminal" aria-hidden="true"></i>
<i class="fa fa-code" aria-hidden="true"></i>
<i class="fa fa-cogs" aria-hidden="true"></i>
<i class="fa fa-tachometer" aria-hidden="true"></i>
</div>
<div>
<i class="fa fa-microchip" aria-hidden="true"></i>
<i class="fa...
CSS
@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900&display=swap');
*
{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
header
{
position: absolute;
top: 0;
left: 0;
width: 100%;
padding: 30px 100px;
z-index: 1;
display: flex;
justify-content: space-between;
align-items: center;
}
header .logo
{
color: #fff;
font-weight: 700;
text-decoration: none;
font-size: 2em;
text-transform: uppercase;
letter-spacing: 2px;
}
header ul
{
display: flex;
justify-content: center;
align-items: center;
}
header ul li
{
list-style: none;
margin-left: 20px;
}
header ul li a
{
text-decoration: none;
padding: 6px 15px;
color: #fff;
}
header ul li a:hover,
header ul li a.active
{
background: #fff;
color: #5865f2;
border-radius: 20px;
}
header ul li a.invite
{
background: #5865f2;
color: #fff;
border-radius: 20px;
}
body
{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: transparent;
}
.h2-parent {
position: absolute;
top: 0;
left: 0;
height: 100%;
max-width: 600px;
width: 600px;
padding-left: 10px;
padding-right: 10px;
z-index: 10;
}
h2
{
position: relative;
width: 100%;
top: 40%;
transform: translateY(-50%);
font-size: 5vw;
color: rgba(255,255,255,0.5);
text-transform: uppercase;
}
.abs-h2
{
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
color: #5865f2;
-webkit-text-stroke: 0vw rgb(51, 51, 51);
border-right: 2px solid #5865f2;
overflow: hidden;
animation: animate-t 6s linear infinite;
}
.abs-h2 h2
{
position: relative;
width: 600px;
top: 40%;
left:10px;
transform: translateY(-50%);
font-size: 5vw;
color: #5865f2;
text-transform: uppercase;
}
@keyframes animate-t
{
...