这不是一个JS问题,只是寻找一个明确的css解决方案,如果可能的话.
对于单选按钮或复选框,我们可以使用:checked伪类:
:checked
input{ % styles % } input:checked{ % another styles % }
有没有检查文件附件是否与CSS存在的技巧?
html css input
css ×1
html ×1
input ×1