Home  >  Article  >  Web Front-end  >  How to change the color of html hyperlink without changing it completely_html/css_WEB-ITnose

How to change the color of html hyperlink without changing it completely_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:06:261912browse

After writing the attribute that changes the color of a hyperlink in CSS, when you click on a hyperlink, the hyperlinks in the entire web page will change color accordingly. How can I avoid changing the color in one go?
Ask the master to give an example, write in css


Reply to the discussion (solution)

You should find a under the specific module, and then Add a style

For example, .menu a:hover{} Add a mouseover style to a under menu with class

Add a class attribute to the link
Baidu

By writing this in CSS, you can only change Baidu without changing Google's

Just set a separate class or id for each a tag

in declares the specific module