CSS如何添加錨點
1. 在HTML中添加錨點:錨點以一個點號(.)開頭,后面跟著一個或多個元素名。例如:
.link-to-element {
position: relative;
top: 10px;
.link-to-element:after {
content: "";
position: absolute;
top: 20px;
left: 10px;
width: 10px;
height: 10px;
background-color: red;
transform: rotate(-45deg);
transform-origin: 0 100%;
.link-to-element {
display: inline-block;
width: 20px;
height: 20px;
border: 1px solid #ccc;
border-radius: 50%;
cursor: pointer;
.link-to-element:hover {
background-color: #4CAF50;