input[type='text'] CSS selector does not apply to default-type text inputs?

后端 未结 5 1243
醉梦人生
醉梦人生 2021-02-02 05:26

The default input type is \'text\'. I have always assumed then that CSS declarations targeting input[type=\'text\'] would affect those inputs even if the type was n

5条回答
  •  孤独总比滥情好
    2021-02-02 05:39

    To be compliant with all browsers you should always declare the input type.

    Some browsers will assume default type as 'text', but this isn't a good practice.

提交回复
热议问题