How to change hyperlink color with css

王林
Release: 2020-11-26 17:09:55
Original
5596 people have browsed it

Css method to change the color of a hyperlink: [a:link{color:#000000;}], a:link means that the hyperlink has not been visited. If you want to set the color of a hyperlink after it is clicked, you can use the method [a:visited {color:#00FF00;}].

How to change hyperlink color with css

Environment:

This article applies to all brands of computers.

(Learning video sharing: css video tutorial)

How to set a hyperlink in css:

  • a:link: It is an unvisited style. You can add a lot of things to it. For example, functions such as removing underlines and changing colors can be implemented here;

  • a: visited: after it has been clicked style, you can also add many elements to it, you can remove underline, change color, zoom in and other functions;

  • a:hover: This is the mouse hover style, this will be available later Example introduction, let’s first understand that you can set the color to change when the mouse is parked at the position of the hyperlink;

  • a:active: This is the style that has been activated. To put it simply, when you click the mouse, the style will appear instantly. This style is available on many websites;

Use the following method to modify the hyperlink color. :

a:link{color:#000000;}      /* 未访问链接*/
a:visited {color:#00FF00;}  /* 已访问链接 */
a:hover {color:#FF00FF;}  /* 鼠标移动到链接上 */
a:active {color:#0000FF;}  /* 鼠标点击时 */
Copy after login

Related recommendations: CSS tutorial

The above is the detailed content of How to change hyperlink color with css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!