3 4 jQuery usage: dynamic addition of small ads-JS Tutorial-php.cn

jQuery usage: dynamic addition of small ads

巴扎黑
Release: 2017-07-23 15:07:08
Original
1180 people have browsed it

When browsing a website, some websites always place advertisements in the lower right corner, upper left corner or other places.

I tried to make one myself using jQuery. The code is as follows. If there is something wrong, please let me know.

1  2  3  4  5  6  7 21 
22 23 24 25 
Copy after login

The rendering is as follows

Regarding this effect, I have the following thoughts:

1. You can add a timer to count down '5S to close' and '4S' Close' tells the user that this advertisement is only temporarily placed and will be automatically closed after 5 seconds. This can enhance the user experience. We all know that when browsing some websites, advertisements always take up space and hang in front of your eyes. The user experience is definitely not very good. , which can create a good balance between advertisers and user experience;

2. The reason why the background color is orange is because orange is a warm color. Personal experience, if the advertising background is a warm color , I am more willing to let him stay for some time, compared to ads with cold background colors;

3. Of course, this is just a small code. After the masters complete the content, they can encapsulate it, and it will definitely be more convenient to use. .

The above is the detailed content of jQuery usage: dynamic addition of small ads. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!