First, let's take the following code as an example:
<Style type = "text/CSS">
A: link {text-Decoration: none; color: Blue ;}
A: hover {text-Decoration: underline; color: red ;}
A: active {text-Decoration: none; color: yellow ;}
A: visited {text-Decoration: none; color: green ;}
</Style>
The effect is: the hyperlink text is displayed in blue without being clicked; the hyperlink text is displayed in red when the mouse is placed on the Link; when the link is clicked, the link is activated, the link is highlighted in yellow. After a link is clicked, that is, the link has been accessed, and the link is green without an underscore.
Where:
A: link refers to a normal link that has not been accessed;
A: hover refers to the mouse over the link;
A: The link of active vertices;
A: visited refers to the accessed link.
Parameter settings:
Text-decoration indicates the effect of text modification; none indicates that the hyperlink text is not underlined; Underline indicates that the hyperlink text is underlined; overline indicates that the hyperlink text is underlined; line-through is used to delete the hyperlink text. Blink is used to make the text flash.
Color: blue, color: Red, etc. are used to add color to the link text.
You can also add other parameters, such:
Font-weight: bold to bold the link text; font-size: 16pt to set the link text font size; Background: # ffd306 to add the background color to the link text; font-style: italic link text skew; border-bottom: 1px dashed #51bfe0 adds a dotted line to the link text. 1px indicates the coarse granularity of the dotted line. The larger the value, the thicker the dashed indicates the dotted line, #51bfe0 is the dotted line color. If you want to add a dotted line to the link text, you do not need to underline it.
For example, the following two sections of code:
<Style type = "text/CSS">
A: hover {text-Decoration: none; border-bottom: 1px dashed red ;}
</Style>
The effect is that when the mouse is placed on the link, the link is marked with a red dotted underline.
<Style type = "text/CSS">
A: hover {text-Decoration: underline; font-weight: bold; color: red; Background: Blue; font-style: italic ;}
</Style>
The effect is that when the mouse is placed on the link, the link is underlined, the font is bold, the link text is red, the background is blue, and the text is skewed.
To remove the underlines of all links, use the following code:
<Style type = "text/CSS">
A: Link, A: hover, A: active, A: visited {text-Decoration: none ;}
</Style>