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;}].
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;} /* 鼠标点击时 */
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!