CSS how to target 2 attributes?

前端 未结 3 1352
时光说笑
时光说笑 2020-12-30 23:12

OK if I want to target an tag with type=\"submit\" I can do so like:

input[type=submit]

Also if I w

3条回答
  •  盖世英雄少女心
    2020-12-30 23:53

    input[type=submit][value=Delete]
    

    You're chaining selectors. Each step narrows your search results:

    input
    

    finds all inputs.

    input[type=submit]
    

    narrows it to submits, while

    input[type=submit][value=Delete]
    

    narrows it to what you need.

提交回复
热议问题