前提・実現したいこと
友達にWEBサイトの作成を依頼され、HTLM, CSSを使い作成中です。
CSSで.button:activeの時、別のクラスの要素をフェードアウトするにはどうすれば良いでしょうか?
ソースコード
HTML
<img src="background1.JPG" class="backgroudImg1"> <div class="top"> <a class="topText">Test</a> <input type="submit" class="button" value="> click the screen"> </div>
CSS
@keyframes fadeOut{ 0%{ opacity: 1; } 100%{ opacity: 0; } } .button{ text-align: center; position: absolute; top: 80%; left: 40%; font-weight: bold; text-decoration: none; color: #FFF; text-shadow: 0 0 5px rgba(255, 255, 255, 0.73); padding: 0.3em 0.5em; display: inline; } .button:active + .top{ animation-name: fadeOut; animation: 1s; }
試したこと
.button:active + .top{ animation-name: fadeOut; animation: 1s; }
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。