此代码在桌面版 Chrome 中运行良好,但在 android stock 浏览器中运行不正常:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
input:checked ~ span {color:red;}
</style>
</head>
<body>
<label>
<input type="checkbox" />
<span>First item</span>
</label>
</body>
</html>
基本上,当您单击 hte 复选标记时,span 标记文本应变为红色。在我的 Galaxy Note 和 Android 4.0 上它没有变红。
我的代码有什么问题?
最佳答案
关于android - CSS - 兄弟选择器在 android 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15192674/