1+ * [\:animation= "fade-in" ],
2+ * [animation = "fade-in" ] {
3+ opacity : 0 ;
4+ transition : opacity 0.3s ease-in 0s ;
5+ }
6+
7+ * [\:animation= "fade-in" ].show ,
8+ * [animation = "fade-in" ].show {
9+ opacity : 1 ;
10+ }
11+
12+ * [\:animation= "expand" ],
13+ * [animation = "expand" ] {
14+ min-height : 0 ;
15+ height : 0 ;
16+ overflow : hidden;
17+ transition : min-height 0.3s ease-in 0s ;
18+ }
19+
20+ * [\:animation= "expand" ].show ,
21+ * [animation = "expand" ].show {
22+ opacity : 1 ;
23+ }
24+
25+ * [\:mask= "1=true" ],
26+ * [mask = "true" ],
27+ * [\:mask= "1" ],
28+ * [mask = "1" ] {
29+ position : relative;
30+ }
31+
32+ * [\:mask= "1=true" ]::after ,
33+ * [mask = "true" ]::after ,
34+ * [\:mask= "1" ]::after ,
35+ * [mask = "1" ]::after {
36+ content: '' ;
37+ position: absolute;
38+ to p: 0;
39+ left: 0;
40+ right: 0;
41+ botto m: 0;
42+ background: linear- gradient(to right, # e0e0e0 25%, # f0f0f0 , # e0e0e0 75%);
43+ /* 使用灰色漸層 */
44+ background- size: 200% 100%;
45+ /* 背景尺寸兩倍寬度 */
46+ animation: loading- animation 1.5s infinite alternate;
47+ /* 來回移動動畫 */
48+ z- index: 10;
49+ transition: 0.3s;
50+ }
51+
52+ * [\:mask= "1=true" ]::after ,
53+ * [mask = "true" ]::after ,
54+ * [\:mask= "1" ].show ::after ,
55+ * [mask = "1" ].show ::after {
56+ opacity : 0 ;
57+ }
58+
59+ @keyframes loading-animation {
60+ 0% {
61+ background-position : -100% 0 ;
62+ }
63+
64+ 100% {
65+ background-position : 100% 0 ;
66+ }
67+ }
68+
69+ img [lazyload ]: not ([lazyload = "" ]) {
70+ width : 1rem ;
71+ height : 1rem ;
72+ border : 0.25rem solid rgba (0 , 0 , 0 , 0.1 );
73+ border-top-color : # 3498db ;
74+ border-radius : 50% ;
75+ animation : spin 2s ease-in-out infinite;
76+ }
77+
78+ @keyframes spin {
79+ 0% {
80+ transform : rotate (0deg );
81+ }
82+
83+ 100% {
84+ transform : rotate (360deg );
85+ }
86+ }
87+
88+ img [src ]: not ([src = "" ]) {
89+ width : unset;
90+ height : unset;
91+ border : 0 solid transparent;
92+ border-radius : 0 ;
93+ animation : none;
94+ transition : width 0.3s ;
95+ transition : height 0.3s ;
96+ }
0 commit comments