Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does HTML realize the pop-up window advertisement once a day?

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to achieve a pop-up window advertisement once a day by HTML". The editor shows you the operation process through an actual case. The operation method is simple and fast, and it is practical. I hope that this article "how to achieve a pop-up window advertisement once a day in HTML" can help you solve the problem.

Pop-up window ads play once a day.

* {

Margin:0

Padding:0

}

.alert _ windows {

Display:none

Position:absolute

Z-index:10

Width:400px

Height:300px

Background:#566F93

}

.alert _ windows span {

Float:right

Width:30px

Height:30px

Text-align:center

Font:15px/30px Microsoft Yahei

Cursor:pointer

Color:#333

Background:lightblue

}

.alert _ windows span:hover {

Color:#EEE

Background:red

}

$(function () {)

If ($.cookie ("isClose")! = 'yes') {

Var winWid = $(window) .width () / 2-$('.alert _ windows') .width () / 2

Var winHig = $(window) .height () / 2-$('.alert _ windows') .height () / 2

Css ({"left": winWid, "top":-winHig*2}); / / top-down

$(".alert _ windows") .show ()

$(".alert _ windows") .animate ({"left": winWid, "top": winHig}, 1000)

$(".alert _ windows span") .click (function () {

(this). Parent (). FadeOut (500)

$.cookie ("isClose", 'yes', {expires:1/8640}); / / Test for ten seconds

/ / $.cookie ("isClose", 'yes', {expires:1}); one day

});

}

});

Tip: play once a day, turn it off and it's gone.

X

This is the end of the content about "how to play the pop-up window advertisement once a day in HTML". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report