CSS Pulse Effect

CSS Pulse Effect

Description

Applies a single vibration or short pulse to an element.

Syntax

@keyframes pulse { 
0% { transform: scale(1); } 
50% { transform: scale(1.1); } 
100% { transform: scale(1); } 
} 

Parameters

  • transform – Transforms are used to apply 2D and 3D transformations to an element.
  • opacity – Opacity is used to make an element semi-transparent.


Example

<html> 
<head> 
<style> 
.animated { 
background-image: url(https://geek-docs.com/static/https://coder-cafe.com/wp-content/uploads/2025/09/logo.png); 
background-repeat: no-repeat; 
background-position: left top; 
padding-top:95px; 
margin-bottom:60px; 
-webkit-animation-duration: 10s; 
animation-duration: 10s; 
-webkit-animation-fill-mode: both; 
animation-fill-mode: both; 
} 

@-webkit-keyframes pulse { 
0% { -webkit-transform: scale(1); } 
50% { -webkit-transform: scale(1.1); } 
100% { -webkit-transform: scale(1); } 
} 

@keyframes pulse { 
0% { transform: scale(1); } 
50% { transform: scale(1.1); } 
100% { transform: scale(1); } 
} 

.pulse { 
-webkit-animation-name: pulse; 
animation-name: pulse; 
} 
</style> 
</head> 

<body> 

<div id = "animated-example" class = "animated pulse"></div> 
<button onclick = "myFunction()">Reload page</button> 

<script> 
function myFunction() { 
location.reload(); 
} 
</script> 

</body> 
</html> 

It will produce the following resultsāˆ’

Leave a Reply

Your email address will not be published. Required fields are marked *