开发者

CSS selector with two classes on one element

开发者 https://www.devze.com 2022-12-12 15:31 出处:网络
How do I do a CSS selector that selects a div that has the开发者_如何学Python class of someButton AND current?

How do I do a CSS selector that selects a div that has the开发者_如何学Python class of someButton AND current?

.someButton .current { /* select current with the parent div of .someButton, correct? */

Please help me figure this out!


You need to concatenate it: .someButton.current.

With a space, it will be seen as "apply on any element with class .current which is nested in a parent element with class .someButton".


Remove the whitespace

.someButton.current


div.someButton.current { ... }

0

精彩评论

暂无评论...
验证码 换一张
取 消