Cool Shadow Effect HTML+CSS
HTML & CSS နဲ့ loading effect လေးလုပ်ကြည့်မယ်။
HTML code 👇
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Box Effect</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box"></div>
</body>
</html>
CSS code 👇
body{
background: #0e153a;
}
.box{
cursor: pointer;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 75px;
height: 75px;
border-radius: 50%;
animation: anim 3s infinite linear;
}
@keyframes anim{
0%{
box-shadow: 0 0 0 0px rgba(10,90,255,0.47);
}
20%{
box-shadow: 0 0 0 20px rgba(10,90,255,0.47);
}
40%{
box-shadow: 0 0 0 20px rgba(10,90,255,0.47),
0 0 0 40px rgba(10,90,255,0.47);
}
60%{
box-shadow: 0 0 0 10px rgba(10,90,255,0.47),
0 0 0 50px rgba(10,90,255,0.47),
0 0 0 30px rgba(10,90,255,0.47);
}
80%{
box-shadow: 0 0 0 0px rgba(10,90,255,0.47),
0 0 0 40px rgba(10,90,255,0.47),
0 0 0 60px rgba(10,90,255,0.47),
0 0 0 80px rgba(10,90,255,0.47);
}
100%{
box-shadow: 0 0 0 20px rgba(10,90,255,0.47),
0 0 0 40px rgba(10,90,255,0.47),
0 0 0 60px rgba(10,90,255,0.47),
0 0 0 90px rgba(10,90,255,0.47),
0 0 0 120px rgba(10,90,255,0.47);
}
}
Comments
Post a Comment