Yogesh Chauhan's Blog

How to create Glowing Texts using CSS?

in CSS on January 24, 2021

We can use the text-shadow property to create the light effect around the text. After that we can increase and decrease that light effect using animation.

CSS text-shadow Property

The CSS text-shadow property adds shadow to texts.

We can add a comma separated list of values to add shadows to the text.

For example,

We can add more than one shadow to the text by adding a comma separated list of values.

Animation

To create a CSS animation, we need to style the element with the animation property/sub-properties. It will let us configure the timing, duration, and other details of how the animation sequence should progress.

We can use shorthand property to set the animation values. The syntax is:


animation: name duration timing-function delay iteration-count direction fill-mode;

We don’t need to use all sub-properties for our example.

The @keyframes Rule

To change the animation from the current style to the new style at certain times, we can specify the styles inside the @keyframes rule. We also need to bind the animation to an element.

Complete Text Glow Example


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to add Read More Read Less Button using JavaScript? #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#Aug 15 Is PHP still good for back-end programming? #Aug 10 How to create a multisite network in WordPress? #Aug 3 How to create a circle that follows a cursor using JavaScript and CSS? #Aug 3 How to make a curtain slider using jQuery and CSS? #Aug 2 How to progressively load images and add a blurry placeholder? #Aug 1 How to create a placeholder loader (throbber) using CSS?
You might also like these
How to Display Related Posts in WordPress?WordPressHow to Create a Copy of a Table in SQL and MySQL?SQL/MySQLSQL Inner JoinSQL/MySQLHow to get the full URL of current page in PHP?PHPThe flex-grow, flex-shrink and flex-basis Properties in CSSCSSFor Each Loop in Swift for BeginnersSwiftRecursion in JavaScriptJavaScriptWhat is Git?MiscellaneousRecursive WITH Queries in Postgres (Common Table Expressions)PostgresHow to get the first element with a class name xyz using JavaScript?JavaScriptThe difference between isFinite() method and isFinite() function in JavaScriptJavaScriptWhat are Web services?Miscellaneous