Heim > Fragen und Antworten > Hauptteil
黄舟2017-04-17 11:49:08
需要加点的数字单独一个元素,然后用before或after伪元素实现。
<span>5</span>
<style>
span {
position: relative;
font-weight: 800;
font-size: 6rem;
}
span::before {
position: absolute;
content: '';
top: -0.5rem;
left: 50%;
margin-left: -0.5rem;
width: 1rem;
height: 1rem;
border-radius: 0.5rem;
background-color: #000;
}
</style>