Page jump of a tag

<a href=" "> </a>, this is an a tag, which is used to implement page jumps.

<a href="http://www.baidu.com">Baidu</a>

The meaning of this label is that if you click on Baidu, you will jump to the website http://www.baidu.com

But when we actually write it, we will find that the display effect is like this

The display effect carries the styles that come with the a tag, such as font color and underline.

If we want to remove it, we can write text-decoration: none; in the cascading style sheet to change the text decoration or remove the decoration. You can also change the font color through color: black;.

When we need dynamic effects, we can also use hover.

For example, if you want the font to change to another color or size, background color, etc. when the mouse pointer is placed on it.
we can write

a:hover{

color:green;

font-family: 楷体;

}

 When the mouse pointer is placed on the four characters Baidu click, these four characters will turn green and change from the default Song font to Kai font.

Supongo que te gusta

Origin blog.csdn.net/dyk11111/article/details/126628734
Recomendado
Clasificación