In CSS is there a selector for referencing a specific input type that also has a class?

前端 未结 2 719
予麋鹿
予麋鹿 2021-02-01 12:32

Basically I want a CSS selector that grabs all input[type=\"text\"] but that also has a class \"some-class\".

Both of the following don\'t seem to be working for me:

2条回答
  •  忘掉有多难
    2021-02-01 13:18

    You want input.some-class[type="text"]

    .some-class input looks for input tags that are descendants of .some-class.

    input.some-class does the reverse.

提交回复
热议问题