Add floating advertisements for web pages

zhaozj2021-02-16  125

Roaming between the network, you will find that the Internet is not only the ocean of information, but also the ocean of advertising. In addition to ordinary GIF Banner, Flash, floating advertisements are also one of the popular advertising forms. When you drag the browser scroll bar, this advertisement on the page can move with the screen. Although this effect has considerable practical value for advertising demonstrations, this is something hinder reading and affecting reading interest, so it must not be abused. However, if you can make good use, it will play a great role.

It is not difficult to make a floating advertisement. If you have a JavaScript foundation you can write one, if you are too lazy to write, download a special effect tool online, press the prompt and paste the code is OK. However, if you want to really understand how it is made, you need to master some JavaScript knowledge. Here you will introduce you to a simple floating advertising approach.

The following code can be placed between , and I have added some comments (ie "//" text and " ".