Home  >  Article  >  Web Front-end  >  Detailed introduction to CSS basic style links

Detailed introduction to CSS basic style links

高洛峰
高洛峰Original
2017-03-26 11:32:421758browse

This article mainly introduces the basic style links of Css in detail, which has certain reference value. Interested friends can refer to it

1. The four states of Css links

1.a:link Ordinary, unvisited link

2.a:visited Link that the user has visited

3.a:hover The mouse pointer is above the link

4.a:active The moment when the link is clicked

a:link{
    color: #FF0000;
}
a:visited{
    color: #00FF00;
}
a:hover{
    color:#0000FF;
}
a:active{
    color: #0000FF;
}

2. Common link methods

The text-decoration attribute is mostly used to remove the underline in the link

a:link{
    color: #FF0000;
    text-decoration: none;
}

3. Set the background color

background-color

a:link{
    background-color: aquamarine;
}

The above is the detailed content of Detailed introduction to CSS basic style links. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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 admin@php.cn