Shimmer Effect using CSS Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report A Shimmer Effect is much in trend to produce an illusional glass effect on articles, texts, or images. This might seem a very extravagant property from only some CSS frameworks but the fun part is we can do it using CSS and its properties very easily. First of all, create a div container with an article tag and add dummy lines in the code. Style the position relative to this article tag. Add a shimmer div where we'll be creating the magic. Then add basic styling to the current div tags. The position for this shimmer class should be kept relative. Then finally, add styling to the shimmer tag. It mainly has 2 components to add style. Key-Frames - Here you will give the path of the transformation from where to where it will go. It can be vertical or horizontal according to your requirement for alignment.Animation - Add timeframe of the animation and infinite linear i.e. the orientation of the animation. Example: Here is the implementation of the above-explained approach. HTML <!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"> <link rel="stylesheet" href="style.css"> <title>Shimmer Effect using CSS</title> </head> <body> <div class="container"> <article> <div class="line"></div> <div class="line"></div> <div class="line"></div> <div class="shimmer"></div> </article> </div> </body> </html> CSS article{ background: #ddd; width: 100%; position: relative; padding: 20px; box-sizing: border-box; border-radius: 10px; } article .line{ width: 100%; height: 20px; background: #bbb; margin: 20px 0; border-radius: 5px; } article .shimmer{ position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 80%); animation: shimmer 2s infinite linear; } @keyframes shimmer{ from { transform: translateX(-200%); } to{ transform: translateX(200%); } } Output: Shimmer Effect using CSS Comment More infoAdvertise with us Next Article Tailwind CSS Hover Effects S sanssg1701 Follow Improve Article Tags : Technical Scripter Web Technologies CSS Technical Scripter 2022 CSS-Properties CSS-Questions +2 More Similar Reads Tailwind CSS Hover Effects A hover effect is a visual change that occurs when a user moves their mouse pointer over an element on a webpage. We can achieve a hover effect by Tailwind CSS built-in prefix modifier called "hover: ".These are the following ways to use hover:Table of ContentSimple Hover Effect (Background color ch 3 min read CSS Stencil Effect The Stencil effect is a classical text effect that has emerged in the last decade. This type of effect is generally used in websites where the User Interface is not of main concern. Examples of such designs can be found on movie downloading websites where the interface is not the best looking as the 2 min read How to Add Onclick Effect using CSS ? In this article, weâll explore how to create an onclick effect using CSS. While the onclick event is generally associated with JavaScript, about 30â40% of basic visual feedback effectsâsuch as color changes, button presses, or shadow effectsâcan be achieved using CSS alone through the :active pseudo 2 min read CSS Shadow Effect The shadow effect property in CSS is used to add shadows to text and images in HTML documents. This enhances the visual appeal and depth of your web elements, making your design more engaging. Text ShadowThe text-shadow property in CSS is used to display text with a shadow. This property defines the 2 min read W3.CSS Effects W3.CSS provides web developers with various effects. They can broadly be classified into three divisions. They are: OpacityGrayscaleSepiaOpacity Effects:There are four opacity effect classes: Sr. No. Class Name Description 1. w3-opacity-min The opacity of the targeted element is set to 0.75. 2. w3-o 4 min read How to create a marquee effect using CSS ? In this article, we will be creating the marquee effect by using HTML and CSS. This effect can be created by using the <marquee> tag in HTML, but we will not use this tag as it is not widely used nowadays. We will create and design a marquee effect by using the CSS classes and styling properti 2 min read Like