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.


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 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #2 How to add Read More Read Less Button using JavaScript? #3 How to check if radio button is checked or not using JavaScript? #4 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
How to apply style to the first-child using jQuery?jQueryKilling A Project Part 2: Who should make the decision to kill a project?MiscellaneousClean Form Input With These PHP Functions Before Inserting into DatabasePHPHow to Install PHP composer in Mac OS Catalina?PHPHow to Use ROLLUP Operator in SQL and MySQL?SQL/MySQLHow to create a simple slider with CSS and jQuery?CSSWhy do we need HAVING Clause in SQL?SQL/MySQLHow to add new elements with swing animation using JavaScript and CSS?CSS3 ways to pass a variable in url() function in SCSS (Sass)SCSSHow to render Lists in React?React5 Ways to Loop Through JavaScript ArraysJavaScript2 Ways we can create an Array in JavaScriptJavaScript