2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【iPhone】:checkedに複数の隣接セレクターが効かない

Posted at

input[type=checkbox]の:checkedで開閉パネル作ろうとしたら、詰まったのでメモ

#効かない
iOS7とiOS8で。

:checked+label+ul {
//効かない
}

#効く
間接セレクターか疑似クラスを使おう。

:checked ~ ul,
:checked + label:only-of-type + ul:only-of-type {
//効く
}

参考::checked擬似クラスの隣接セレクターのWebkit系での挙動とか - WEBCRE8.jp

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?