回答編集履歴
3
動作修正
test
CHANGED
@@ -81,3 +81,85 @@
|
|
81
81
|
}
|
82
82
|
|
83
83
|
```
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
こちらで
|
88
|
+
|
89
|
+
---
|
90
|
+
|
91
|
+
widthのアニメーションにしました。
|
92
|
+
|
93
|
+
サイズなど数値の調整はそちらでおこなってください。
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
```css
|
98
|
+
|
99
|
+
.su-post {
|
100
|
+
|
101
|
+
position: relative;
|
102
|
+
|
103
|
+
height: 2em;/*この辺調整してください*/
|
104
|
+
|
105
|
+
width: 140px;/*この辺調整してください*/
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
.su-post2 {
|
110
|
+
|
111
|
+
position: absolute;
|
112
|
+
|
113
|
+
top: 0;
|
114
|
+
|
115
|
+
left: 0;
|
116
|
+
|
117
|
+
height: 100%;
|
118
|
+
|
119
|
+
width: 100%;
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
animation-name: su-post2;
|
124
|
+
|
125
|
+
animation-timing-function:ease;
|
126
|
+
|
127
|
+
animation-duration: 2s;
|
128
|
+
|
129
|
+
animation-fill-mode: forwards;
|
130
|
+
|
131
|
+
}
|
132
|
+
|
133
|
+
.su-post2 a {
|
134
|
+
|
135
|
+
display: block;
|
136
|
+
|
137
|
+
position: absolute;
|
138
|
+
|
139
|
+
top: 0;
|
140
|
+
|
141
|
+
left: 0;
|
142
|
+
|
143
|
+
height: 100%;
|
144
|
+
|
145
|
+
width: 140px;/*.su-postと同じ幅にしてください*/
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
@keyframes su-post2 {
|
150
|
+
|
151
|
+
from {
|
152
|
+
|
153
|
+
width: 0;
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
to {
|
158
|
+
|
159
|
+
width: 100%;
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
```
|
2
動作修正
test
CHANGED
@@ -41,3 +41,43 @@
|
|
41
41
|
|
42
42
|
|
43
43
|
```
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
動作修正
|
48
|
+
|
49
|
+
---
|
50
|
+
|
51
|
+
animationの始まりをtranslateX(0)にして、.marquee::afterの背景を白にすればできるような…
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
```css
|
58
|
+
|
59
|
+
@keyframes marquee {
|
60
|
+
|
61
|
+
from {
|
62
|
+
|
63
|
+
transform: translateX(0);
|
64
|
+
|
65
|
+
}
|
66
|
+
|
67
|
+
to {
|
68
|
+
|
69
|
+
transform: translateX(100%);
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
.marquee::after {
|
78
|
+
|
79
|
+
background:#fff;
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
```
|
1
左→右
test
CHANGED
@@ -26,16 +26,18 @@
|
|
26
26
|
|
27
27
|
from {
|
28
28
|
|
29
|
-
transform: translateX(100%);
|
29
|
+
transform: translateX(-100%);
|
30
30
|
|
31
31
|
}
|
32
32
|
|
33
33
|
to {
|
34
34
|
|
35
|
-
transform: translateX(0);
|
35
|
+
transform: translateX(100%);
|
36
36
|
|
37
37
|
}
|
38
38
|
|
39
39
|
}
|
40
40
|
|
41
|
+
|
42
|
+
|
41
43
|
```
|