回答編集履歴
1
chousei
answer
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
marqueeは廃止されたので、cssのキーフレームで処理します
|
2
|
+
※blinkも追記しておきました
|
2
3
|
```css
|
3
4
|
<style>
|
4
5
|
.marquee {
|
@@ -6,21 +7,28 @@
|
|
6
7
|
overflow:hidden;
|
7
8
|
position:relative;
|
8
9
|
}
|
9
|
-
|
10
10
|
.marquee > *{
|
11
11
|
display:inline-block;
|
12
|
-
|
12
|
+
padding-left:600px;
|
13
13
|
white-space:nowrap;
|
14
|
-
animation-name:marquee;
|
15
|
-
animation-timing-function:linear;
|
16
|
-
animation-duration:5s;
|
17
|
-
animation
|
14
|
+
animation:marquee linear 5s infinite;
|
18
15
|
}
|
19
16
|
@keyframes marquee {
|
20
17
|
from { transform: translate(0%);}
|
21
18
|
99%,to { transform: translate(-100%);}
|
22
19
|
}
|
20
|
+
@keyframes blink {
|
21
|
+
from{ opacity:0;}
|
22
|
+
to { opacity:1;}
|
23
|
+
}
|
24
|
+
.blink{
|
25
|
+
animation:blink linear 1s infinite;
|
26
|
+
}
|
27
|
+
.bold{
|
28
|
+
font-weight:bold;
|
29
|
+
}
|
23
30
|
</style>
|
31
|
+
<div class="blink bold">この部分を点滅</div>
|
24
|
-
<div class="marquee"><div><img src="
|
32
|
+
<div class="marquee"><div><img src="#" alt="img"></div></div>
|
25
33
|
<div class="marquee"><span>testtesttesttesttesttest</span></div>
|
26
34
|
```
|