回答編集履歴
3
動作修正
answer
CHANGED
@@ -39,4 +39,45 @@
|
|
39
39
|
.marquee::after {
|
40
40
|
background:#fff;
|
41
41
|
}
|
42
|
+
```
|
43
|
+
|
44
|
+
こちらで
|
45
|
+
---
|
46
|
+
widthのアニメーションにしました。
|
47
|
+
サイズなど数値の調整はそちらでおこなってください。
|
48
|
+
|
49
|
+
```css
|
50
|
+
.su-post {
|
51
|
+
position: relative;
|
52
|
+
height: 2em;/*この辺調整してください*/
|
53
|
+
width: 140px;/*この辺調整してください*/
|
54
|
+
}
|
55
|
+
.su-post2 {
|
56
|
+
position: absolute;
|
57
|
+
top: 0;
|
58
|
+
left: 0;
|
59
|
+
height: 100%;
|
60
|
+
width: 100%;
|
61
|
+
|
62
|
+
animation-name: su-post2;
|
63
|
+
animation-timing-function:ease;
|
64
|
+
animation-duration: 2s;
|
65
|
+
animation-fill-mode: forwards;
|
66
|
+
}
|
67
|
+
.su-post2 a {
|
68
|
+
display: block;
|
69
|
+
position: absolute;
|
70
|
+
top: 0;
|
71
|
+
left: 0;
|
72
|
+
height: 100%;
|
73
|
+
width: 140px;/*.su-postと同じ幅にしてください*/
|
74
|
+
}
|
75
|
+
@keyframes su-post2 {
|
76
|
+
from {
|
77
|
+
width: 0;
|
78
|
+
}
|
79
|
+
to {
|
80
|
+
width: 100%;
|
81
|
+
}
|
82
|
+
}
|
42
83
|
```
|
2
動作修正
answer
CHANGED
@@ -19,4 +19,24 @@
|
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
|
+
```
|
23
|
+
|
24
|
+
動作修正
|
25
|
+
---
|
26
|
+
animationの始まりをtranslateX(0)にして、.marquee::afterの背景を白にすればできるような…
|
27
|
+
|
28
|
+
|
29
|
+
```css
|
30
|
+
@keyframes marquee {
|
31
|
+
from {
|
32
|
+
transform: translateX(0);
|
33
|
+
}
|
34
|
+
to {
|
35
|
+
transform: translateX(100%);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
.marquee::after {
|
40
|
+
background:#fff;
|
41
|
+
}
|
22
42
|
```
|
1
左→右
answer
CHANGED
@@ -12,10 +12,11 @@
|
|
12
12
|
}
|
13
13
|
@keyframes su-post-text {
|
14
14
|
from {
|
15
|
-
transform: translateX(100%);
|
15
|
+
transform: translateX(-100%);
|
16
16
|
}
|
17
17
|
to {
|
18
|
-
transform: translateX(
|
18
|
+
transform: translateX(100%);
|
19
19
|
}
|
20
20
|
}
|
21
|
+
|
21
22
|
```
|