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

Vue realizes screen adaptation of large screen pages

This article shares the specific code of Vue to a...

HTML dl, dt, dd tags to create a table vs. Table creation table

Not only does it reduce the cost of website develo...

MySQL's conceptual understanding of various locks

Optimistic Locking Optimistic locking is mostly i...

Details about the like operator in MySQL

1. Introduction When filtering unknown or partial...

Detailed steps to build an independent mail server on Centos7.9

Table of contents Preface 1. Configure intranet D...

JavaScript css3 to implement simple video barrage function

This article attempts to write a demo to simulate...

Mysql auto-increment primary key id is not processed in this way

Mysql auto-increment primary key id does not incr...

How to create a child process in nodejs

Table of contents Introduction Child Process Crea...

avue-crud implementation example of multi-level complex dynamic header

Table of contents Preface Background data splicin...

JavaScript Sandbox Exploration

Table of contents 1. Scenario 2. Basic functions ...

MySQL permissions and database design case study

Permissions and database design User Management U...

JS implements a simple counter

Use HTML CSS and JavaScript to implement a simple...