Causes and Consequences of Super Rabbit's disappearance of the floating layer

Source: Internet
Author: User
Tags visibility
Just finished rising Kaka, and rushed to a Super Rabbit. However, the shooting method of Super rabbits really needs to be improved.
Still the same problem: when a user who has installed the Super Rabbit IE tool bar buys an automatic delivery product, the purchase reminder box in the form of LightBox disappears as soon as it is displayed. The gray masking layer still shows that the user cannot continue to operate.
According to the study, the Super Rabbit blocking principle for blocking advertisements is more arbitrary, as long as the JavaScript code appears similar to "div. style. position = absolute "code, the div will be hidden, not only that, Super Rabbit will also check the elements in the page, as long as the position style attribute and any supporting top/left attribute are set for an element in the form of inline, such as "<div style =" position: absolute; top: 0; "> xxx </div>", it will also be hidden.
However, unlike rising Kaka, Super rabbits do not erase absolute positioning elements from the DOM. Set the style. visibility = hidden of the element. This is why the purchase reminder box for automatic delivery disappears.
How can we avoid the blind shooting of Super rabbits? In fact, it is very simple. Do not use JavaScript or set absolute positioning of relevant CSS attributes in the form of inline. These CSS attributes can be defined directly in the style sheet file or <style/> in the form of class or id (this should also be done ).
If you have to use JavaScript to set absolute positioning attributes, such as menu/animation effects. We have to use a script to solve the problem. Do you still remember the difference between Super Rabbit and rising Kaka in handling floating advertisements? The pseudo code may be as follows:
<Script type = "text/javascript">
Function setPosition (){
FloatLayer. style. top = y;
FloatLayer. style. left = x;
SetTimeout (checkSR, 100 );
}
Function checkSR (){
If (FloatLayer. currentStyle & FloatLayer. currentStyle. visibility = 'den den '))
FixUp ();
}
</Script>
I hate floating advertisements too, but the Taobao page is really clean, isn't it?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.