By editing the CSS properties (including color, font-family, background, …) we can create and edit links as we wish. Refer to the article link in CSS Below of Taimienphi.vn to find out detailed information.
Learn links in CSS
1. Link in CSS
2. Text-decoration property in CSS
3. Background-Color property
4. Link Button in CSS.
1. Link in CSS
To set different link states, we can use the following properties:
a: link – The link has not been accessed.
a: visited – the link the user has accessed.
a: hover – link when user hovers over the mouse
a: active – The link works when the user clicks.
For example:
The output will look like:
When setting the style for status links, we need to note the following rules:
a: hover must follow status a: link and a: visited.
a: active must follow status a: hover.
2. Text-decoration property in CSS
Properties text-decoration In CSS it is used to delete the underlines in each link.
For example:
The output will look like:
3. Background-Color property
Properties background-color Used to set the background color for links in CSS.
For example:
The output will look like:
4. Link Button in CSS.
For example: The following illustrates how to combine several CSS properties to display links in the form of boxes or buttons:
The output will look like:
https://thuthuat.taimienphi.vn/link-trong-css-49088n.aspx
The above lesson Taimienphi.vn has just introduced you to the link in CSS. In the next CSS lessons Taimienphi.vn will introduce you more about properties Format tables in CSS. If you have any questions, you can comment on the article below so that Taimienphi.vn can help you learn CSS better.
.