Detailed introduction to CSS basic style links

高洛峰
Release: 2017-03-26 11:32:42
Original
1759 people have browsed it

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;
}
Copy after login

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;
}
Copy after login

3. Set the background color

background-color

a:link{
    background-color: aquamarine;
}
Copy after login

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!

Related labels:
css
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 admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template