我试图隐藏html中的所有标签 <input type=radio>
我有这个css
input{display: none}
Run Code Online (Sandbox Code Playgroud)
然而,这甚至隐藏了按钮,因为它们是 <input type=button>
有没有办法隐藏无线电类型的输入?
我可以使用jquery,如果需要,但如果它可以通过js或更好,但只是CSS,那么我会更喜欢...
我使用IE6所以没有CSS3
由于您需要支持IE 6,您可以使用jQuery:
$( "input[type='radio']" ).css( "display", "none" );
// Or call the .hide() method
Run Code Online (Sandbox Code Playgroud)
在更现代的浏览器中,您可以使用属性选择器:
input[type=radio] { display: none }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6063 次 |
| 最近记录: |