How to underline the a tag and change the color before and after clicking

How to underline the a tag and change the color before and after clicking

Copy code
The code is as follows:

a:link {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a:visited {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a:hover {
font-size: 12px;
color: #999999;
text-decoration: underline;
}

Defining the style sheet in this way can achieve your function. If you don’t know the style sheet, you can add the following code to the <head></head> tag of your page:

Copy code
The code is as follows:

<style type="text/css">
<!--
a:link {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a:visited {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a:hover {
font-size: 12px;
color: #999999;
text-decoration: underline;
}
-->
</style>

<<:  Detailed explanation of the idea of ​​implementing dynamic effect of lyrics progress text color filling change using CSS3

>>:  A brief analysis of Linux network programming functions

Recommend

Use Visual Studio Code to connect to the MySql database and query

Visual Studio Code is a powerful text editor prod...

Example code for evenly distributing elements using css3 flex layout

This article mainly introduces how to evenly dist...

Linux kernel device driver kernel linked list usage notes

/******************** * Application of linked lis...

A brief discussion on MySQL event planning tasks

1. Check whether event is enabled show variables ...

Tutorial on installing MYSQL8.X on Centos

MySQL installation (4, 5, 6 can be omitted) State...

Install CentOS system based on WindowsX Hyper-V

At present, most people who use Linux either use ...

HTML discount price calculation implementation principle and script code

Copy code The code is as follows: <!DOCTYPE HT...

Discussion on the Issues of Image Button Submission and Form Repeated Submission

In many cases, in order to beautify the form, the ...

A brief analysis of the difference between static and self in PHP classes

Use self:: or __CLASS__ to get a static reference...

Docker setting windows storage path operation

When installing Docker on Windows 10, after selec...

Vue recursively implements three-level menu

This article example shares the specific code of ...

Sample code for implementing 3D book effect with CSS

Without further ado, let's take a look at the...

Tutorial diagram of using Jenkins for automated deployment under Windows

Today we will talk about how to use Jenkins+power...

Detailed explanation of samba folder sharing server configuration under centos

1. Introduction Recently I found that there are m...