<!-- Original pen: https://codepen.io/akhilarjun/pen/YzqXvYv -->
<section class="vibration-demo">
<div class="vibration">
<span>V</span><span>I</span><span>B</span><span>R</span><span>A</span><span>T</span><span>I</span><span>N</span><span>G</span>
</div>
</section>
body{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
min-height: 100vh;
scroll-behavior: smooth;
}
section {
height: 100vh;
font-size: 80px;
font-weight: bold;
transition: all 200ms;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
background-position: 50% 50%;
display: grid;
place-items: center;
z-index: 1;
cursor: pointer;
position: relative;
padding: 20px;
}
.vibration-demo {
background: #c29cea;
}
/*Vibration*/
.vibration span{
transition: all 500ms;
color: rgba(255, 255, 255, 0.8);
display: inline-block;
margin-right: 10px;
text-shadow: 1px 2px 3px #999;
}
.vibration span:hover{
filter: blur(3px);
animation: vibrate 50ms linear infinite forwards;
}
@keyframes vibrate{
0% {
transform: translateX(-1px) translateY(1px);
}
100% {
transform: translateX(1px) translateY(-2px);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.