亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - How to insert an advertisement at the top of the page without destroying the page layout (without affecting the content below)?
我想大聲告訴你
我想大聲告訴你 2017-07-05 10:40:45
0
4
1162

is a long advertisement at the top, pushing down other content. Directly inserting a p img will not work, as it will cause the underlying content to be misaligned or cover up. Can it be solved using js/jquery?

我想大聲告訴你
我想大聲告訴你

reply all(4)
三叔

Wrap it with a p

<p><img src="xxx" /></p>

小葫蘆

Generally, advertisements on web pages are a piece of js code. It is easier to place ads in this way. The function of the js code is to request materials, create dom elements, adjust the layout, and handle the display and click logic. If the line is troublesome, you can directly set an iframe.

女神的閨蜜愛上我

If the ad space is 100% wide and 200px high

body{
    margin-top : 200px;
}

.banner{
    position : fixed;
    width:100%;
    height:200px;
    top:0;
    left:0;
}
黃舟

To prevent the content below from being misaligned or covered, you can just create a translucent overlay advertisement. Use pointer-events:none and apply pointer-events:none to the translucent overlay element. The content behind the translucent overlay can be seen. Get it, you can also perform click events
For details, please refer to the master
http://www.zhangxinxu.com/stu...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template