0
Why is ~ not working in case of .icon class ?
input[type="checkbox"]:checked ~ i{ color:#9f9; } input[type="checkbox"]:checked ~ .icon{ box-shadow: inset 2px 2px 3px grey ; } It the above code , the '~' is working perfectly in case of i tag but not working in class = "icon" ?? Why ?
4 ответов
+ 3
Can you write full code on Sololearn Playground and share here. Maybe you did something mistake.
+ 3
ABHISHEK I found that ~ works on next tag or class or id. But your class is before the checkbox That's Why it's not working.
Check this code edited by me Just check the last icons and click on that.
https://code.sololearn.com/WqGn9jJSbylr/?ref=app
+ 1
🅰🅹 - Sʀ. Sᴏғᴛᴡᴀʀᴇ Eɴɢɪɴᴇᴇʀ
Wow
Thanks a lot❤️😊