前提・実現したいこと
inputのcheckboxのクリック時に、#up-wordを上に移動するアニメーションを作りたいのですが、クリックしても全く動きません。
原因がわからないため、質問させていただきました。
よろしくお願いします!
該当のソースコード
html
1<label for="label1"><div id="up-word">Test</div></label> 2 <input type="checkbox" id="label1" class="cssacc" />
css
1#up-word { 2 position: absolute; 3 font-weight: bold; 4 font-size: 13.3vw; 5 top: 60%; 6 left: 2%; 7 margin:0; 8 padding:0; 9 z-index: 3; 10 overflow: auto; 11 transition: .3s ease-in-out; 12 -webkit-transform: translateY(0%); 13 transform: translateY(0%); 14} 15.cssacc:checked ~ #up-word{ 16 -webkit-transform: translateY(-240%); 17 transform: translateY(-240%); 18}
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/03/26 10:12