문제

How can I add specifity to something that reads:

input[type="text"] { color:red }

I want something like:

#my_id input[type="text"] { color:red }
도움이 되었습니까?

해결책

You mean like this?

input[type="text"]#my_id { color:red }

See the demo

다른 팁

When you use an id and don't want to address a child node you can omit any other parts, a id must be unique so far you can use just:

#my_id { color:red }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top