forked from shinpei2022/thisleaf.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
marks.css
149 lines (135 loc) · 3.12 KB
/
marks.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/* cssでつくる記号やアイコン
inline-block要素
サイズはフォントサイズに依存する
色などはcss変数で指定する
*/
/* X
<div class="mark_x"><div></div><div></div></div>
*/
.mark_x {
--weight: 0.15em;
--color: black;
display: inline-block;
vertical-align: -0.15em;
width: 1em;
height: 1em;
}
.mark_x > :nth-child(-n+2) {
position: absolute;
display: inline-block;
width: 1em;
height: var(--weight);
background-color: var(--color);
border-radius: calc(var(--weight) / 2);
transform-origin: center;
}
.mark_x > :nth-child(1) {
transform: translateY(calc(0.5em - var(--weight) / 2)) rotate(45deg);
}
.mark_x > :nth-child(2) {
transform: translateY(calc(0.5em - var(--weight) / 2)) rotate(-45deg);
}
/* 丸 ○
<div class="mark_circle"><div></div></div>
*/
.mark_circle {
--weight: 0.15em;
--color: black;
--inner-color: transparent;
display: inline-block;
vertical-align: -0.15em;
width: 1em;
height: 1em;
}
.mark_circle > :first-child {
width: calc(0.8em - var(--weight) * 2);
height: calc(0.8em - var(--weight) * 2);
border-radius: calc(0.8em - var(--weight));
border-style: solid;
border-width: var(--weight);
border-color: var(--color);
background-color: var(--inner-color);
transform: translate(0.1em, 0.1em);
}
.mark_radial {
--length: 0.2em;
--weight: 0.1em;
--color: black;
display: inline-block;
vertical-align: -0.15em;
width: 1em;
height: 1em;
}
.mark_radial > :nth-child(-n+8) {
position: absolute;
width: var(--length);
height: var(--weight);
background-color: var(--color);
border-radius: calc(var(--weight) / 2);
transform-origin: center;
--move1: translateX(calc(0.4em - var(--length) / 2));
--move2: translate(calc(0.5em - var(--length) / 2), calc(0.5em - var(--weight) / 2));
}
.mark_radial > :nth-child(1) {
transform: var(--move2) rotate(45deg) var(--move1);
}
.mark_radial > :nth-child(2) {
transform: var(--move2) rotate(90deg) var(--move1);
}
.mark_radial > :nth-child(3) {
transform: var(--move2) rotate(135deg) var(--move1);
}
.mark_radial > :nth-child(4) {
transform: var(--move2) rotate(180deg) var(--move1);
}
.mark_radial > :nth-child(5) {
transform: var(--move2) rotate(225deg) var(--move1);
}
.mark_radial > :nth-child(6) {
transform: var(--move2) rotate(270deg) var(--move1);
}
.mark_radial > :nth-child(7) {
transform: var(--move2) rotate(315deg) var(--move1);
}
.mark_radial > :nth-child(8) {
transform: var(--move2) var(--move1);
}
/* animation の css
animation-name: none;
animation-duration: 0s;
animation-timing-function: ease;
animation-delay: 0s;
animation-iteration-count: 1;
animation-direction: normal;
animation-fill-mode: none;
animation-play-state: running;
*/
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes blink {
from {
opacity: 1;
}
50% {
opacity: 0;
}
to {
opacity: 1;
}
}
.rotate {
animation: 1.5s linear infinite rotation;
}
.blink {
/*animation: 1.5s linear infinite blink;*/
animation-name: blink, rotation;
animation-duration: 1.5s, 1.5s;
animation-timing-function: linear, linear;
animation-iteration-count: infinite, infinite;
}