Closed extf33 closed 4 months ago
How to select only pre.CCC with "Hello, Rust!" immediately before it, in the code below?
pre.CCC
<section id="AAA"> <p class="BBB">Hello, Rust!</p> <pre class="CCC">...</pre> ----------> O <p>...</p> <pre class="CCC">...</pre> ----------> X </section>
Did you try p.BBB + pre.CCC which selects the pre.CCC if it is immediately preceded by p.BBB? If you try select based on Hello, Rust!, then this not yet possible with CSS selectors AFAIK.
p.BBB + pre.CCC
p.BBB
Hello, Rust!
How to select only
pre.CCC
with "Hello, Rust!" immediately before it, in the code below?