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?
高洛峰2017-07-05 10:42:45
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.
女神的闺蜜爱上我2017-07-05 10:42:45
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;
}
黄舟2017-07-05 10:42:45
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...