{"id":710,"date":"2023-09-20T06:43:06","date_gmt":"2023-09-20T11:43:06","guid":{"rendered":"https:\/\/forfrontend.com\/?p=710"},"modified":"2024-04-24T21:25:51","modified_gmt":"2024-04-25T02:25:51","slug":"css-pulse-animation-button","status":"publish","type":"post","link":"https:\/\/forfrontend.com\/css-pulse-animation-button\/","title":{"rendered":"How to Create a CSS Pulse Animation Button"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Welcome back to our new animation series. In this post, we will delve into everything you need to know about <strong>css pulse animation<\/strong>. But what exactly is pulse animation? It&#8217;s a type of css animation that creates an impulse on any HTML element. This animation is often incorporated into websites to highlight certain points, encouraging user interaction. It&#8217;s commonly used for elements like the notification bell icon, sign-up buttons, and hamburger icons. Today, we will learn about CSS Pulse Animation in a step-by-step manner, covering topics such as <mark style=\"background-color:#a9ffd7\" class=\"has-inline-color\">hover pulse animation, text pulse animation, and CSS pulse animation on click<\/mark>. To create any type of pulse animation, <strong>we will need to use the CSS keyframe scale rule and Opacity property<\/strong>.<\/p>\n\n\n<div class=\"gb-container gb-container-38d5f44b\">\n<div class=\"gb-container gb-container-337c6748\">\n\n<p class=\"wp-block-paragraph\"><strong>Also Read:<\/strong><\/p>\n\n\n<div class=\"gb-container gb-container-c382925c\">\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/forfrontend.com\/css-pulse-animations\/\" data-type=\"post\" data-id=\"1954\">12 CSS Pulse Animations<\/a><\/p>\n\n<\/div>\n<\/div>\n<\/div>\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#Simple_Text_CSS_Pulse_Animation\" >Simple Text CSS Pulse Animation<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#Html_Code_For_Text_Pulse\" >Html Code For Text Pulse:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#Text_Pulse_Animation_CSS\" >Text Pulse Animation CSS<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#How_to_create_On_Hover_CSS_Pulse_Animation\" >How to create On Hover CSS Pulse Animation?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#How_to_Create_CSS_Pulse_Animation_on_Click\" >How to Create CSS Pulse Animation on Click?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#CSS_Pulse_Animation_Button\" >CSS Pulse Animation Button<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#Html_Code_For_Pulsing_Button\" >Html Code For Pulsing Button<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#CSS_Styling_For_Pulse_Button\" >CSS Styling For Pulse Button<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#CSS_Pulse_Button_Animation\" >CSS Pulse Button Animation<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/#Related_Post\" >Related Post<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Simple_Text_CSS_Pulse_Animation\"><\/span>Simple Text CSS Pulse Animation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is a simple text pulse animation that can be applied to any HTML element. The keyframes property in CSS is used to define the animation.<\/p>\n\n\n<div class=\"gb-container gb-container-156c5fd4 ex-post-main-box\">\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5787258203496599\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"fluid\"\n     data-ad-layout-key=\"-6t+ed+2i-1n-4w\"\n     data-ad-client=\"ca-pub-5787258203496599\"\n     data-ad-slot=\"2493303957\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Html_Code_For_Text_Pulse\"><\/span>Html Code For Text Pulse:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<div class=\"gb-container gb-container-5c7299e8\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;div class=&quot;element&quot;&gt;Pulse Animation&lt;\/div&gt;\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #808080\">&lt;<\/span><span style=\"color: #569CD6\">div<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">class<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #CE9178\">&quot;element&quot;<\/span><span style=\"color: #808080\">&gt;<\/span><span style=\"color: #D4D4D4\">Pulse Animation<\/span><span style=\"color: #808080\">&lt;\/<\/span><span style=\"color: #569CD6\">div<\/span><span style=\"color: #808080\">&gt;<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#1E1E1E;color:#c7c7c7;font-size:12px;line-height:1;position:relative\">HTML<\/span><\/div>\n\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Text_Pulse_Animation_CSS\"><\/span>Text Pulse Animation CSS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The CSS code defines a keyframes animation named &#8220;pulse&#8221;. The animation changes the scale of an element over time. At the start (0%), the scale is 1 (normal size). At the halfway point (50%), the scale is 1.1 (<mark style=\"background-color:#a9ffd7\" class=\"has-inline-color\">10% larger<\/mark>). At the end (100%), the scale returns to 1. The animation is applied to any element with the class &#8220;element&#8221;, and it lasts for 2 seconds and repeats indefinitely (<code>infinite<\/code>).<\/p>\n\n\n<div class=\"gb-container gb-container-124b3c12\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#272822\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"@keyframes pulse {\n  0% {\n    transform: scale(1);\n  }\n  50% {\n    transform: scale(1.1);\n  }\n  100% {\n    transform: scale(1);\n  }\n}\n\n.element {\n  animation: pulse 2s infinite;\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F92672\">@keyframes<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FD971F; font-style: italic\">pulse<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  0% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  50% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1.1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  100% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #A6E22E\">.element<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">animation<\/span><span style=\"color: #F8F8F2\">: pulse <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F92672\">s<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">infinite<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#272822;color:#efefe1;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n<div class=\"gb-container gb-container-9f03b1ac\">\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"186\" src=\"https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/Text-Pulse-Animation-CSS.gif\" alt=\"Text Pulse Animation CSS\" class=\"wp-image-712\"\/><\/figure>\n<\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_create_On_Hover_CSS_Pulse_Animation\"><\/span>How to create On Hover CSS Pulse Animation?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Creating an on-hover CSS Pulse Animation involves using the CSS pseudo-class <code><mark style=\"background-color:#a9ffd7\" class=\"has-inline-color\">:hover<\/mark><\/code>. This pseudo-class is used to select and style an element when the user hovers over it. Remember, the <strong>Keyframe<\/strong> rule is same for it. Here&#8217;s how you can create pulse animation on hover: <\/p>\n\n\n<div class=\"gb-container gb-container-de9f132d\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#272822\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"@keyframes pulse {\n  0% {\n    transform: scale(1);\n  }\n  50% {\n    transform: scale(1.1);\n  }\n  100% {\n    transform: scale(1);\n  }\n}\n\n.element:hover {\n  animation: pulse 2s infinite;\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F92672\">@keyframes<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FD971F; font-style: italic\">pulse<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  0% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  50% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1.1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  100% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #A6E22E\">.element:hover<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">animation<\/span><span style=\"color: #F8F8F2\">: pulse <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F92672\">s<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">infinite<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#272822;color:#efefe1;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Create_CSS_Pulse_Animation_on_Click\"><\/span>How to Create CSS Pulse Animation on Click?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To create a CSS Pulse Animation on click, we use CSS to design the animation and JavaScript to activate it on a click event. The animation is tied to a class, which is added to the element when it&#8217;s clicked, triggering the pulse effect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Html Code:<\/strong><\/p>\n\n\n<div class=\"gb-container gb-container-00242a65\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;div class=&quot;element&quot;&gt;Click me&lt;\/div&gt;\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #808080\">&lt;<\/span><span style=\"color: #569CD6\">div<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">class<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #CE9178\">&quot;element&quot;<\/span><span style=\"color: #808080\">&gt;<\/span><span style=\"color: #D4D4D4\">Click me<\/span><span style=\"color: #808080\">&lt;\/<\/span><span style=\"color: #569CD6\">div<\/span><span style=\"color: #808080\">&gt;<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#1E1E1E;color:#c7c7c7;font-size:12px;line-height:1;position:relative\">HTML<\/span><\/div>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>CSS:<\/strong><\/p>\n\n\n<div class=\"gb-container gb-container-80d1cc06\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#272822\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"@keyframes pulse {\n  0% {\n    transform: scale(1);\n  }\n  50% {\n    transform: scale(1.1);\n  }\n  100% {\n    transform: scale(1);\n  }\n}\n.clicked-element {\n  animation: pulse 2s infinite;\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F92672\">@keyframes<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FD971F; font-style: italic\">pulse<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  0% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  50% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1.1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  100% {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">scale<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6E22E\">.clicked-element<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">animation<\/span><span style=\"color: #F8F8F2\">: pulse <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F92672\">s<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">infinite<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#272822;color:#efefe1;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>JavaScript Code:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript is necessary because CSS alone cannot detect a click event. We write a small JavaScript code that listens for a click event on the desired element. When the element is clicked, our JavaScript code adds the &#8220;<strong>clicked-element<\/strong>&#8221; class (which we defined in our CSS) to the clicked element.<\/p>\n\n\n<div class=\"gb-container gb-container-e6d8f47f\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#282c34\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"document.querySelector('.element').addEventListener('click', function() {\n  this.classList.add('clicked-element');\n});\" style=\"color:#abb2bf;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki one-dark-pro\" style=\"background-color: #282c34\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E5C07B\">document<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #61AFEF\">querySelector<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">&#39;.element&#39;<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #61AFEF\">addEventListener<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">&#39;click&#39;<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E5C07B\">this<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E5C07B\">classList<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #61AFEF\">add<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">&#39;clicked-element&#39;<\/span><span style=\"color: #ABB2BF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ABB2BF\">});<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#282c34;color:#9da5b4;font-size:12px;line-height:1;position:relative\">JavaScript<\/span><\/div>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n<div class=\"gb-container gb-container-fdddc9d2\">\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"186\" src=\"https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/CSS-Pulse-Animation-On-Click.gif\" alt=\"CSS Pulse Animation On Click \" class=\"wp-image-713\"\/><\/figure>\n<\/div>\n<\/div>\n\n<div class=\"gb-container gb-container-2cc3521f\">\n<div class=\"gb-container gb-container-d59b7464\">\n\n<p class=\"wp-block-paragraph\">If you&#8217;re interested in downloading the source code, just click the button \ud83d\udd18 below  \ud83d\udc47. It&#8217;s as simple as that!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity has-luminous-vivid-orange-to-vivid-red-gradient-background has-background is-style-default\"\/>\n\n\n<div class=\"gb-container gb-container-daaedf0a\">\n\n<a class=\"gb-button gb-button-74be6438\" href=\"https:\/\/codepen.io\/waqasamin608\/pen\/zYMerXW\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"gb-icon\"><svg aria-hidden=\"true\" role=\"img\" height=\"1em\" width=\"1em\" viewBox=\"0 0 512 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path fill=\"currentColor\" d=\"M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z\"><\/path><\/svg><\/span><span class=\"gb-button-text\"><strong>Live Demo<\/strong><\/span><\/a>\n\n\n\n<a class=\"gb-button gb-button-6fa8120d\" href=\"https:\/\/codepen.io\/cpe\/pen\/export\/zYMerXW\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"gb-icon\"><svg aria-hidden=\"true\" role=\"img\" height=\"1em\" width=\"1em\" viewBox=\"0 0 448 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path fill=\"currentColor\" d=\"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z\"><\/path><\/svg><\/span><span class=\"gb-button-text\"><strong>Download<\/strong><\/span><\/a>\n\n<\/div>\n<\/div>\n<\/div>\n\n<div class=\"gb-container gb-container-156c5fd4 ex-post-main-box\">\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5787258203496599\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"fluid\"\n     data-ad-layout-key=\"-6t+ed+2i-1n-4w\"\n     data-ad-client=\"ca-pub-5787258203496599\"\n     data-ad-slot=\"2493303957\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CSS_Pulse_Animation_Button\"><\/span>CSS Pulse Animation Button<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Creating a CSS Pulse Animation Button involves defining a button in your HTML structure and then applying CSS styles and animations to it. The button is styled to your preference, and a pulse animation is created using the <code><mark style=\"background-color:#a9ffd7\" class=\"has-inline-color\">@keyframes<\/mark><\/code> rule in CSS. This animation is then applied to the button, resulting in a pulsing effect. This can be particularly useful for drawing attention to a specific button, such as a call to action, on your webpage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Html_Code_For_Pulsing_Button\"><\/span>Html Code For Pulsing Button<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is the basic HTML structure for the pulse button. It consists of a <code>div<\/code> element with a class name of &#8220;center&#8221;. Inside this <code><mark style=\"background-color:#a9ffd7\" class=\"has-inline-color\">div<\/mark><\/code>, there&#8217;s a <code>button<\/code> element with a class name of &#8220;pulse&#8221;. The text inside the button is &#8220;FEU !&#8221;.<\/p>\n\n\n<div class=\"gb-container gb-container-2a217951\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;div class=&quot;center&quot;&gt;\n    &lt;button class=&quot;pulse&quot;&gt;FEU !&lt;\/button&gt;\n&lt;\/div&gt;\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #808080\">&lt;<\/span><span style=\"color: #569CD6\">div<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">class<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #CE9178\">&quot;center&quot;<\/span><span style=\"color: #808080\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #808080\">&lt;<\/span><span style=\"color: #569CD6\">button<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">class<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #CE9178\">&quot;pulse&quot;<\/span><span style=\"color: #808080\">&gt;<\/span><span style=\"color: #D4D4D4\">FEU !<\/span><span style=\"color: #808080\">&lt;\/<\/span><span style=\"color: #569CD6\">button<\/span><span style=\"color: #808080\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #808080\">&lt;\/<\/span><span style=\"color: #569CD6\">div<\/span><span style=\"color: #808080\">&gt;<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#1E1E1E;color:#c7c7c7;font-size:12px;line-height:1;position:relative\">HTML<\/span><\/div>\n\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CSS_Styling_For_Pulse_Button\"><\/span>CSS Styling For Pulse Button<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The CSS code styles the HTML elements. The &#8220;center&#8221; class uses absolute positioning to place the button at the center of the page. The <code><mark style=\"background-color:#a9ffd7\" class=\"has-inline-color\">transform: translate(-50%,-50%)<\/mark>;<\/code> line ensures the button is centered both vertically and horizontally.<\/p>\n\n\n<div class=\"gb-container gb-container-74108c76\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#272822\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"body\n{\n  margin: 0;\n  padding: 0;\n  background: #202020;\n}\n\n.center\n{\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%,-50%);\n}\n.pulse\n{\n  width: 100px;\n  height: 100px;\n  background: #ff0400;\n  border-radius: 50%;\n  color: #fff;\n  font-size:20px;\n  text-align: center;\n  line-height: 100px;\n  font-family: verdana;\n  text-tranform: uppercase;\n  animation: animate 2s linear infinite;\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F92672\">body<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">margin<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">padding<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">background<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">#202020<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #A6E22E\">.center<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">position<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">absolute<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">top<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">50<\/span><span style=\"color: #F92672\">%<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">left<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">50<\/span><span style=\"color: #F92672\">%<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">transform<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">translate<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">-50<\/span><span style=\"color: #F92672\">%<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">-50<\/span><span style=\"color: #F92672\">%<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6E22E\">.pulse<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">width<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">100<\/span><span style=\"color: #F92672\">px<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">height<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">100<\/span><span style=\"color: #F92672\">px<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">background<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">#ff0400<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">border-radius<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">50<\/span><span style=\"color: #F92672\">%<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">color<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">#fff<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">font-size<\/span><span style=\"color: #F8F8F2\">:<\/span><span style=\"color: #AE81FF\">20<\/span><span style=\"color: #F92672\">px<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">text-align<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">center<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">line-height<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">100<\/span><span style=\"color: #F92672\">px<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">font-family<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #66D9EF\">verdana<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  text-tranform: <\/span><span style=\"color: #66D9EF\">uppercase<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  <\/span><span style=\"color: #66D9EF; font-style: italic\">animation<\/span><span style=\"color: #F8F8F2\">: animate <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F92672\">s<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">linear<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">infinite<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#272822;color:#efefe1;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The &#8220;pulse&#8221; class styles the button. It sets the width, height, and background color of the button. The <code>border-radius;<\/code> line makes the button circular. The text inside the button is styled with color, <code>font-size, text-align, line-height, and font-family properties. The text-transform: uppercase;<\/code> line converts the text to uppercase. The <code>animation: animate 2s linear infinite;<\/code> line applies the &#8220;animate&#8221; keyframes animation to the button. The animation lasts for 2 seconds, has a constant speed (<code>linear<\/code>), and repeats indefinitely (<code>infinite<\/code>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n<div class=\"gb-container gb-container-2d828112\">\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"396\" src=\"https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/CSS-Pulse-Button-1024x396.jpg\" alt=\"CSS Pulse Animation Button\" class=\"wp-image-714\" srcset=\"https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/CSS-Pulse-Button-1024x396.jpg 1024w, https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/CSS-Pulse-Button-300x116.jpg 300w, https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/CSS-Pulse-Button-768x297.jpg 768w, https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/CSS-Pulse-Button.jpg 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CSS_Pulse_Button_Animation\"><\/span>CSS Pulse Button Animation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>@keyframes animate<\/code> rule in the CSS code is defining an animation named &#8220;animate&#8221;. This animation is changing the <code>box-shadow<\/code> property of the button over time, creating a pulsing effect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>box-shadow<\/code> property applies one or more shadows to an element. It is defined by X and Y offsets relative to the element, blur and spread radii, and color. In this case, two shadows are applied, and their spread radius and color are animated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s a breakdown of the keyframes:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>0%<\/strong>: At the start of the animation, both shadows have a spread radius of 0 (meaning they are not visible), and their color is a semi-transparent red (<code>rgba(255,4,0,.7)<\/code>).<\/li>\n\n\n\n<li><strong>40%<\/strong>: At 40% of the animation duration, the first shadow is still not visible, but the second shadow has a spread radius of 30px and the same semi-transparent red color.<\/li>\n\n\n\n<li><strong>80%<\/strong>: At 80% of the animation duration, the first shadow is still not visible, but the second shadow has a larger spread radius of 70px and is now fully transparent (<code>rgba(255,4,0,0)<\/code>), making it invisible.<\/li>\n\n\n\n<li><strong>100%<\/strong>: At the end of the animation, the first shadow is back to its initial state, and the second shadow has a spread radius of 30px and is fully transparent.<\/li>\n<\/ol>\n\n\n<div class=\"gb-container gb-container-6ed1371d\">\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#272822\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"@keyframes animate\n{\n    0%\n  {\n    box-shadow: 0 0 0 0 rgba(255,4,0,.7), 0 0 0 0 rgba(255,4,0,.7);\n  }\n    40%\n  {\n    box-shadow: 0 0 0 0 rgba(255,4,0,0), 0 0 0 30px rgba(255,4,0,.7);\n  }\n    80%\n  {\n    box-shadow: 0 0 0 0 rgba(255,4,0,0), 0 0 0 70px rgba(255,4,0,0);\n  }\n    100%\n  {\n    box-shadow: 0 0 0 0 rgba(255,4,0,.7), 0 0 0 30px rgba(255,4,0,0);\n  }\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F92672\">@keyframes<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #FD971F; font-style: italic\">animate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    0%<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">box-shadow<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">.7<\/span><span style=\"color: #F8F8F2\">), <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">.7<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    40%<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">box-shadow<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">), <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">30<\/span><span style=\"color: #F92672\">px<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">.7<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    80%<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">box-shadow<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">), <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">70<\/span><span style=\"color: #F92672\">px<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    100%<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">box-shadow<\/span><span style=\"color: #F8F8F2\">: <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">.7<\/span><span style=\"color: #F8F8F2\">), <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">30<\/span><span style=\"color: #F92672\">px<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #66D9EF\">rgba<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #AE81FF\">255<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">4<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">,<\/span><span style=\"color: #AE81FF\">0<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#272822;color:#efefe1;font-size:12px;line-height:1;position:relative\">CSS<\/span><\/div>\n\n<\/div>\n\n<div class=\"gb-container gb-container-156c5fd4 ex-post-main-box\">\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5787258203496599\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"fluid\"\n     data-ad-layout-key=\"-6t+ed+2i-1n-4w\"\n     data-ad-client=\"ca-pub-5787258203496599\"\n     data-ad-slot=\"2493303957\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">This sequence of keyframes creates a pulsing effect, where the button seems to emit a red glow that expands and contracts. The glow is created by the second shadow, which changes its spread radius and transparency over time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n<div class=\"gb-container gb-container-cba92a29\">\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"430\" src=\"https:\/\/forfrontend.com\/wp-content\/uploads\/2023\/08\/Pulse-Animation-Button.gif\" alt=\"Button pulse animation \" class=\"wp-image-716\"\/><\/figure>\n<\/div>\n<\/div>\n\n<div class=\"gb-container gb-container-16bb4324\">\n<div class=\"gb-container gb-container-ee442503\">\n\n<p class=\"wp-block-paragraph\">If you&#8217;re interested in downloading the source code, just click the button \ud83d\udd18 below  \ud83d\udc47. It&#8217;s as simple as that!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity has-luminous-vivid-orange-to-vivid-red-gradient-background has-background is-style-default\"\/>\n\n\n<div class=\"gb-container gb-container-ae341ec3\">\n\n<a class=\"gb-button gb-button-1eec3f8a\" href=\"https:\/\/codepen.io\/zhelico\/pen\/LyaKRP\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"gb-icon\"><svg aria-hidden=\"true\" role=\"img\" height=\"1em\" width=\"1em\" viewBox=\"0 0 512 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path fill=\"currentColor\" d=\"M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z\"><\/path><\/svg><\/span><span class=\"gb-button-text\"><strong>Live Demo<\/strong><\/span><\/a>\n\n\n\n<a class=\"gb-button gb-button-a1fa4756\" href=\"https:\/\/codepen.io\/cpe\/pen\/export\/LyaKRP\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"gb-icon\"><svg aria-hidden=\"true\" role=\"img\" height=\"1em\" width=\"1em\" viewBox=\"0 0 448 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path fill=\"currentColor\" d=\"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z\"><\/path><\/svg><\/span><span class=\"gb-button-text\"><strong>Download<\/strong><\/span><\/a>\n\n<\/div>\n<\/div>\n<\/div>\n\n<section class=\"gb-container gb-container-b1dc83d0 Related_post\">\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Related_Post\"><\/span>Related Post<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/forfrontend.com\/blink-css-animation\/\" data-type=\"post\" data-id=\"673\">How to Make a Blink CSS Animation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forfrontend.com\/how-to-create-html-404-template\/\" data-type=\"post\" data-id=\"1629\">How to Create HTML 404 Template<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forfrontend.com\/draggable-elements-using-css\/\" data-type=\"post\" data-id=\"497\">How to Create Draggable Elements Using CSS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forfrontend.com\/wave-text-animation-using-css\/\" data-type=\"post\" data-id=\"687\">How to Design Wave Text Animation using CSS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forfrontend.com\/popup-animation-css\/\" data-type=\"post\" data-id=\"935\">15 Popup Animation CSS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forfrontend.com\/css-paginations\/\" data-type=\"post\" data-id=\"1249\">20+ CSS Paginations<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forfrontend.com\/css-pricing-table\/\" data-type=\"post\" data-id=\"1255\">15+ CSS Pricing Tables<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forfrontend.com\/css-dropdown-buttons\/\" data-type=\"post\" data-id=\"2195\">10 CSS Dropdown Buttons<\/a><\/li>\n<\/ul>\n\n<\/section>","protected":false},"excerpt":{"rendered":"<p>Welcome back to our new animation series. In this post, we will delve into everything &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Create a CSS Pulse Animation Button\" class=\"read-more button\" href=\"https:\/\/forfrontend.com\/css-pulse-animation-button\/\" aria-label=\"More on How to Create a CSS Pulse Animation Button\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":715,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[36],"tags":[130,60,107,58,134,132,135,133],"class_list":["post-710","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-animation","tag-css","tag-css-button","tag-html","tag-on-hover-pulse","tag-pulse-animation","tag-pulse-animation-on-click","tag-pulse-button","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/posts\/710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/comments?post=710"}],"version-history":[{"count":16,"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/posts\/710\/revisions"}],"predecessor-version":[{"id":3744,"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/posts\/710\/revisions\/3744"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/media\/715"}],"wp:attachment":[{"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/media?parent=710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/categories?post=710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/forfrontend.com\/wp-json\/wp\/v2\/tags?post=710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}