CSS to achieve glowing text and a little bit of JS special effects

CSS to achieve glowing text and a little bit of JS special effects

Implementation ideas:

Use text-shadow in CSS to achieve the glowing effect of text

Effect picture:

The code is as follows:

</head>
  <style>
    body{
      background-color:#000;
    }
    .textArea{
      font-size:100px;
      color:#fff;
      text-shadow:0 0 5px #e0ea33,
           0 0 15px #e0ea33,
           0 0 25px #e0ea33;
      margin-top:200px;
      text-align:center;
    }
  </style>
<body>
  <p class="textArea">帅</p><!--Text content here-->
 </body>
<script>
  var text = document.querySelector ('.textArea'); //Get our P tag //Trigger when the mouse pointer enters the P tag text.onmouseenter = function () {
  text.innerHTML = 'I am your father'; //Set the HTML between P tags
  };
  //Trigger when the mouse pointer leaves the P tag text.onmouseleave=function(){
  text.innerHTML = 'cool'; //Set the HTML between P tags
  };
</script>

Summarize

The above is the CSS implementation of luminous text and a little bit of JS special effects introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time!

<<:  Website redesign is a difficult task for every family

>>:  Solution for Docker container not recognizing fonts such as Songti

Recommend

How to modify the forgotten password when installing MySQL on Mac

1. Install MySQL database on mac 1. Download MySQ...

Summary of MySQL string interception related functions

This article introduces MySQL string interception...

Detailed explanation of the mysql database LIKE operator in python

The LIKE operator is used in the WHERE clause to ...

Chinese and English font name comparison table (including Founder and Arphic)

In CSS files, we often see some font names become...

Should I use distinct or group by to remove duplicates in MySQL?

Preface About the performance comparison between ...

Ubuntu opens port 22

Scenario You need to use the xshell tool to conne...

Detailed explanation of MySQL database binlog cleanup command

Overview Today I will mainly share how to correct...

Introduction to scheduled tasks in Linux system

Table of contents 1. Customize plan tasks 2. Sync...

Detailed explanation of the correct way to open em in CSS

Why do we say “usually 1em=16px”? The default tex...

How to Install and Configure Postfix Mail Server on CentOS 8

Postfix is ​​a free and open source MTA (Mail Tra...

Solutions to Files/Folders That Cannot Be Deleted in Linux

Preface Recently our server was attacked by hacke...

Comparison of two implementation methods of Vue drop-down list

Two implementations of Vue drop-down list The fir...