Mouse Hover Effect in Html CSS and Javascript #27
<!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>mouse hover</title>
<style>
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
section {
position: relative;
width: 100%;
height: 100vh;
background-color: rgb(0, 0, 0);
display: flex;
flex-wrap: wrap;
overflow: hidden;
animation: changecolor 5s linear infinite;
}
@keyframes changecolor
{
0%{
filter: hue-rotate(0deg);
}
100%{
filter: hue-rotate(360deg);
}
}
span {
position: relative;
width: 40px;
height: 40px;
display: block;
}
span::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #00ff0a;
transform: scale(0.1);
box-shadow: 0 0 10px #00ff0a,
0 0 20px #00ff0a,
0 0 30px #00ff0a,
0 0 40px #09500c,
0 0 50px #00ff0a,
0 0 60px #00ff0a,
0 0 70px #00ff0a,
0 0 80px #00ff0a,
0 0 90px #00ff0a,
0 0 100px #00ff0a;
border-radius: 50%;
pointer-events: none;
transition: 0s;
}
span:hover:before {
transform: scale(100%);
transition: 0s;
}
</style>
</head>
<body>
<section>
<script>
for(var i=1; i<=544;i++){
document.write("<span></span>")
}
</script>
</section>
</body>
</html>
Comments