Hi, I will provide a free code for all of you on my YouTube channel, in learn Glitch effect Using HTML and CSS, Very Easy. The learning is very easy, simple and easy to understand for beginners, good luck, good luck, my advice is don't forget to keep learning and repeat until you can, happy coding. have a nice day friend.
This is my post for the previous one, you just have to learn it properly, and I will provide the latest updates about teaching web design quickly and easily
The best way is to always learn and practice directly, don't get hung up on confusing code, if you enter the wrong code, don't panic
This is the code HTML and CSS you need learn :
1. 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>Glitch</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 class="glitch">YouTube</h1>
</body>
</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>Glitch</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 class="glitch">YouTube</h1>
</body>
</html>
2. CSS
* {
margin: 0; padding: 0;
box-sizing: border-box;
font-family: 'Montserrat';
}
body {
background: #251B37;
color: #fff;
}
.glitch {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 100px;
letter-spacing: 8px;
cursor: pointer;
}
.glitch::before, .glitch::after {
content: 'YouTube';
display: block;
position: absolute;
top: 0px;
left: 0px;
}
.glitch:hover::before {
animation: glitch 0.3s linear 6;
color: #e91e63;
z-index: -2;
}
.glitch:hover::after {
animation: glitch 0.3s linear 6 reverse;
color: #2196f3;
z-index: -1;
}
@keyframes glitch {
0% {
top: 0;
left: 0;
}
20% {
top: -5px;
left: -5px;
}
40% {
top: 5px;
left: 5px;
}
60% {
top: -5px;
left: 5px;
}
80% {
top: 5px;
left: -5px;
}
100% {
top: 0;
left: 0;
}
}
Support my channel. Comment, like and subscribe, success for all of us, happy world hereafter. Amin, Good Luck. 😀
Belum ada tanggapan untuk "Glitch effect Using HTML and CSS, Very Easy"
Post a Comment