I wonder what is ::content
in a css rule ?
The thing is that when I use AdBlock Plus(for chrome), it seems that it will add a css rule to my websites, as below:
It will make the dom hidden (display: none
), and I try to reset the css to make it seen using setTimeout
, but I failed, both csses (the ABP adds and I add) work, so the dom is still not seen.
I check the css the ABP adds, finding ::content, I wonder it's the reason why I cannot reset the css rules, but after google, I find nothing useful.
So I come here to see if there is someone to help me! With great thanks!
答案 0 :(得分:1)
I'm having trouble finding official documentation on this pseudo-element selector, but it's a selector for Shadow DOM elements. See the following excerpts from the AdBlock Plus Chrome extensions source code:
include.preload.js
convertSelectorsForShadowDOM
function convertSelectorsForShadowDOM(selectors)
{
var result = [];
var prefix = "::content ";
...
include.preload.js
call to convertSelectorsForShadowDOM
// If using shadow DOM, we have to add the ::content pseudo-element
// before each selector, in order to match elements within the
// insertion point.
if (shadow)
selectors = convertSelectorsForShadowDOM(selectors);