Is there a shorter way of writing this?
.form1 input[group="write"], .form1 select[group="write"], .form1 textarea[group="write"] {开发者_Python百科 display: none; }
the group
is just an attribute i use to group inputs.
ideally Id like
.form1 (input|select|textarea)[group="write"] { display: none; }
Not sure why you're not using class
to group your form elements instead of a custom attribute like group
, but anyway, I suppose this catch-all rule will do:
.form1 [group="write"] { display: none; }
If you need to explicitly match input
, select
and textarea
elements only, there's no shorter way in CSS3 than what you have.
精彩评论