“`css
#link {
color: blue;
text-decoration: none;
font-weight: bold;
“`css
#link.red {
color: red;
使用class属性时,需要将“red”作为class名称,并将值设置为相应的样式。
“`css
#link {
color: blue;
text-decoration: none;
font-weight: bold;
#link:hover {
text-decoration: underline;
#link:hover:after {
content: “”;
background-color: blue;
border-radius: 50%;
padding: 2px;
margin-top: -2px;
“`css
#link {
color: blue;
“`css
#link {
color: blue;
background-color: #007bff;
“`css
#link {
font-size: 16px;
font-weight: bold;
#link:hover {
font-size: 14px;
font-weight: bold;
#link:hover {
background-color: #0069d9;