CSS不常用属性记录
# clip-path 裁剪可现实区域
下面三个都是利用clip-path实现,具体方法请看文档

# writing-mode 文本水平或垂直排列的方向
参数效果如下:

# counter-reset、counter-increment css计数
counter-reset:使用计数器之前需重置计数器,默认0。计数器可嵌套,每次嵌套都需要重置 counter-increment:增加当前计数器 counter():获取指定计数器值 文档
<template>
<!-- css的counter-increment、counter-reset -->
<div class="container">
<ul>
<li v-for="(item, index) in 5"></li>
</ul>
</div>
</template>
<style scoped lang="scss">
.container {
ul {
counter-reset: number;
list-style-type: none;
li {
counter-increment: number;
&::before {
content: 'number: ' counter(number);
}
}
}
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
上次更新: 2025/09/05, 8:09:00