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

后端 未结 5 1313
醉梦人生
醉梦人生 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:29

    Because, it is not supposed to do that.

    input[type=text] { } is an attribute selector, and will only select those element, with the matching attribute.

提交回复
热议问题