Article From:

Original address:

Hyperlinks are the most frequently used in Web pages. There are several attributes that we may not notice. We usually use about two of them. Here’s a summary. Let’s look at a web page first.

Copy code ></span></div><pre> 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta charset=Copy code ></span></div></div><p> </p><p> </p><p>Simply put, in the header style tag, a: link is the normal link style that has not been visited, a: activity is the style that the mouse clicks down to release the link during this period, a: hover is the hyperlink style that the mouse moves to the hyperlink, a: visitend is already.After clicking on an item in Baidu search results, we will find that the default color has changed. This is based on the browser’s history and caching. After removing the traces, it will be restored.</p><p>Internal Style: Text-decoration represents the effect of text modification, none is no underline, underline is underline, blink is the effect of mouse press, overline is underlined, line-through isAdd delete line.</p><p>Of course, you can also add basic attributes such as color, font, font size, not to mention in detail.</p><p>There are several points to note: a: Active effect default browser is red when the mouse clicks, which we can set up according to the above; a: visited style and a: link are the same and can not be modified except for the color, generally we only change the color; once a: link genusAfter sex setting, other attributes inherit the effect of a: link by default, without specifying, if pointed out individually, according to the indicated display; finally, we should know that CSS follows the order, and later will cover the front, according to this rule layout must consider the code order, according to the code above.The order of attributes can fully represent the four styles of hyperlinks. Don’t reverse them.</p><p>According to the above points, the most commonly used is the default property of a and the effect of mouse playback, so that the code can be reduced to the following:</p><div class=
a{text-decoration: none; color:blue; font-size: 18px; font-family: Microsoft;A: hover {color:6509f; font-size: 19px;}

In this way, only the default and mouse through two cases, and can achieve the mouse through the font larger effect, this kind of use is more.

These are the basic properties of hyperlink settings, on this basis, we can combine the front-end script to achieve more effects and functions.

Leave a Reply

Your email address will not be published. Required fields are marked *