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

Basic application methods of javascript embedded and external links

Table of contents Basic application of javascript...

Linux service monitoring and operation and maintenance

Table of contents 1. Install the psutil package S...

Introduction to Semantic XHTML Tags

The first point to make is that people can judge t...

We're driving IE6 to extinction on our own

In fact, we wonder every day when IE6 will really...

Webpack builds scaffolding to package TypeScript code

Create a folder Directory structure: dabaots Init...

CSS3 click button circular progress tick effect implementation code

Table of contents 8. CSS3 click button circular p...

Solution to the problem that input in form cannot be submitted when disabled

I wrote a test program before, in which adding and...

...

Overview of the definition of HTC components after IE5.0

Before the release of Microsoft IE 5.0, the bigges...

Sample code for implementing DIV suspension with pure CSS (fixed position)

The DIV floating effect (fixed position) is imple...

A brief understanding of MySQL SELECT execution order

The complete syntax of the SELECT statement is: (...

js implements shopping cart addition and subtraction and price calculation

This article example shares the specific code of ...

Native JS to implement login box email prompt

This article shares a native JS implementation of...

How to install Linux online software gcc online

Linux online installation related commands: yum i...

Detailed explanation of the loop form item example in Vue

Sometimes we may encounter such a requirement, th...