###前提・実現したいこと
CSSのみでスライドショーを実現させたいのですが、うまく行きません。
何がうまくいかない原因なのかを教えていただきたいです。
html
1 <div class="mainPhoto"> 2 <p>違<span>いのわかる</span>大人<span>の</span>ヘアサロン</p> 3 <div class="mainshow"> 4 <img src="<?php echo get_template_directory_uri(); ?>/img/main2.jpg" width="960" height="457" alt="" class="slideA"/> 5 <img src="<?php echo get_template_directory_uri(); ?>/img/main_2.jpg" width="960" height="457" alt="" class="slideB"/> 6 </div> 7 </div>
css
1 2main .mainPhoto{ 3 display: block; 4 margin: 0 auto; 5 width: 100%; 6 height: auto; 7 max-width: 960px; 8 position: relative; 9} 10.mainshow { 11 position:relative; 12} 13.mainshow img { 14 animation-name: album; 15 -webkit-animation-name: album; 16 animation-duration: 10s; 17 -webkit-animation-duration: 10s; 18 animation-iteration-count: infinite; 19 -webkit-animation-iteration-count: infinite; 20 opacity: 0; 21} 22.mainshow .slideA { 23 display: block; 24 margin: 0 auto; 25} 26.mainshow .slideB { 27 position: absolute; 28 top: 0; 29} 30 31@keyframes album { 32 0% { 33 opacity: 0; 34 } 35 36 12.5% { 37 opacity: 1; 38 } 39 40 37.5% { 41 opacity: 1; 42 } 43 50% { 44 opacity: 0; 45 } 46 } 47 48.mainshow img { 49 animation-name: album; 50 animation-duration: 10s; 51 animation-iteration-count: infinite; 52 opacity: 0; 53} 54 55.mainshow .slide2 { 56 animation-delay:5s; 57}
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/03/09 13:57
2017/03/09 13:59
2017/03/09 14:01
2017/03/09 14:05
2017/03/09 14:12
2017/03/09 14:27
2017/03/09 14:47
2017/03/09 14:51
2017/03/09 14:57
2017/03/09 14:59