links can be styled differently depending on what state they are in.
The four links states are:
a:link
- a normal, unvisited linka:visited
- a link the user has visiteda:hover
- a link when the user mouses over ita:active
- a link the moment it is clickedThe text-decoration
property is mostly used to remove underlines from links:
a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { color:red; text-decoration: underline; } a:active { text-decoration: underline; }
This example demonstrates a more advanced example where we combine several CSS properties to display links as boxes/buttons:
a:link, a:visited { background-color: #f44336; color: white; padding: 14px 25px; text-align: center; text-decoration: none; display: inline-block; } a:hover, a:active { background-color: red; }
In HTML, there are two main types of lists:
The CSS list properties allow you to:
The list-style-type
property specifies the type of list item marker.
The following example shows some of the available list item markers:
ul.a { list-style-type: circle; } ul.b { list-style-type: square; } ol.c { list-style-type: upper-roman; } ol.d { list-style-type: lower-alpha; }
The list-style-image
property specifies an image as the list item marker:
ul { list-style-image: url(‘sqpurple.gif‘); }
原文:https://www.cnblogs.com/Nyan-Workflow-FC/p/10502856.html