Using CSS Target to highlight parent div

后端 未结 2 889
别那么骄傲
别那么骄傲 2021-01-28 11:14

I\'m using Ckeditor in my site to insert articles. The articles usually come from a Word document, and they have footnotes. With the last Ckeditor build (7125) I\'ve been able t

2条回答
  •  一整个雨季
    2021-01-28 11:43

    What you want is not possible.

    Because if the code for CSS had to check the children of an element and after that has to go back up in the DOM it would get really slow.

    So there is no Ancestor Selector in CSS.

    Perhaps you have control over the parent and can add a class (e.g. footnote) to it.

    Or you can use JavaScript to do what you want.

提交回复
热议问题