How does HTML realize the pop-up window advertisement once a day?
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.