WebSimply wrap all you css code inside the selector for parent element, say it's a div with id of foo you'd do the following: div#foo { //All your css } And convert it as less to css, it will prepend the right selectors. Note that you'll need to take care manually of things like @media queries and so on. Share Improve this answer FollowWebJun 30, 2024 · The following selector represents a “p” element that is child of “body”:body > p. So the style In the parent class can be by just writing the name once like this. .parent li { background:blue; color:black; } If we want to apply the style in child class then use this. .parent > li > ul > li { background:orange }
如何使用css用类声明覆盖内联样式? - 问答 - 腾讯云开发者社区
WebOct 13, 2024 · The element is used by adding opening and closing tags to an HTML document. On its own, the