开发者

Why does adding id="ad_a" to a HTML element sometimes make it invisible in Chrome and Firefox?

I bring to you a simple snippet of HTML:

<HTML>
<HEAD></HEAD>
<BODY>
<div id="ad_a">                 
    test DIV
</div>

test BODY

</BODY>
</HTML>

Yeah, there's no doctype or what have you, but none of that seems to matter for this strange behavior.

Can anybody please tell开发者_如何转开发 me why calling my div id="ad_(ANYTHING HERE)" hides everything inside this div? it just.. disappears.. It shows up in the page source but it doesn't show up on the loaded page..

I first noticed this in Google Chrome. Firefox seems to ignore it (for me at least, but my friend says it happens in his FF) my Internet Explorer 9 also ignores this div name and shows its content on the page.

What is going on and why does it do this?

Is this a commonly used thing? If so, what does it do?


(Posting comment as answer at OP's request)

I'm going out on a limb here, but could an ad-blocking extension be interpreting the ad_ prefix as an advertisement and hiding it? I just ran the code in Chrome with all extensions disabled and it shows up as intended

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜