Hello readers, Today in this blog you'll learn how to create a Glitch Effect in Text using only HTML & CSS. Previously I have shared a Buttons with Cool Shining Hover Effect using HTML CSS, now it's time to create a Text Glitch Effect in HTML & CSS.
I am sure that, You already know what is glitch effect. Mostly these types of glitch effects used in graphic designing, but some websites also use this effect. This is a pretty good effect to place on the website’s banner.
As you can see in the image, this is a glitch effect in the text. This is a pure CSS program. The whole concept is about that move different colors of text together. When 2 or 3 colors text will move randomly, then the glitch effect appears.If you're feeling difficulty to understand what I am saying. You can watch a full video tutorial on this program (Text Glitch Effect).
Video Tutorial of CSS Text Glitch Effect
If you like this program (Text Glitch Effect) and want to get codes of this. You can easily get the source codes of this program. To get the source codes you just need to scroll down.
Text Glitch Effect in HTML & CSS [Source Codes]
As always, before sharing the codes of this program (Text Glitch Effect). Let's a few talk about the main tags and codes of this program. As you already know, this is a pure CSS program. First, I created a <div> with the class name "content" and placed another <div> tag inside it. Inside <div> class name "text" I used data-text attribute to create two duplicate texts.
In the CSS File, first I placed a text element at the center using the CSS Flex property. After that, I did basic styling to text like colors, font-size, font-weight, etc. I used google Poppins font for text. The user ::before and ::after pseudo-elements I created two duplicate color texts. Then using @keyframe I create an animation to moved randomly those texts to show a glitch effect. Inside @keyframes I used clip: rect; property.
To create this program (Text Glitch Effect). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste these following codes in your file. You can also download the source code files through the given link. Click here to download source code files.
In the CSS File, first I placed a text element at the center using the CSS Flex property. After that, I did basic styling to text like colors, font-size, font-weight, etc. I used google Poppins font for text. The user ::before and ::after pseudo-elements I created two duplicate color texts. Then using @keyframe I create an animation to moved randomly those texts to show a glitch effect. Inside @keyframes I used clip: rect; property.
To create this program (Text Glitch Effect). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste these following codes in your file. You can also download the source code files through the given link. Click here to download source code files.
CSS FILE:

Its Nice But It Dosent Glitch The Long Text. Why?
ReplyDeleteI recently updated the codes and solved this problem.. Please check.
DeletePost a Comment
We welcome relevant and respectful comments. Off-topic or spam comments may be removed.