javascript 5秒后关闭广告案例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body {
height: 2000px;
}
img {
position: fixed;
top: 10%;
/*margin-top: -220px;*/
}
.img1 {
left: 10px;
}
.img2 {
right: 10px;
}
div {
width: 800px;
margin: 150px auto;
color: pink;
/*text-align: center;*/
font: 700 25px/1.3 "simSun";
}
</style>
</head>
<body>
<img class="img1" src="data:images/1.gif" alt="">
<img class="img2" src="data:images/2.gif" alt="">
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam quis at enim suscipit expedita perferendis nesciunt rem, fugiat labore itaque dignissimos rerum laborum quam laudantium pariatur! Quasi voluptas sunt, corrupti. Nihil ullam ex magni, veniam, rem sint illo quasi corporis fugit laudantium, eaque possimus molestias iusto ea qui culpa facilis accusamus mollitia quod sapiente. Beatae aliquam illo dolore culpa saepe, reprehenderit voluptates ullam atque minima nostrum distinctio iure, ducimus molestias odit placeat quas nisi ab, molestiae accusantium animi! Beatae numquam deserunt, maxime asperiores nemo voluptates, neque atque expedita corporis facere ducimus laboriosam, cumque! Facilis tempora est ducimus id, consectetur necessitatibus?
</div>
<script> var imgArr = document.getElementsByTagName("img");
//设置定时器
setTimeout(fn,5000);
function fn(){
imgArr[0].style.display = "none";
imgArr[1].style.display = "none";
}
</script>
</body>
</html>
javascript 5秒后关闭广告案例的更多相关文章
- 弹出层提示,X秒后关闭
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD ...
- winfrom弹出窗口用timer控件控制倒计时20秒后关闭
功能描述: 因为在程序退出时需要确认是否是误操作,所以加了密码输入的子窗体,子窗体在20秒内会自动关闭 代码如下: private int count; private void Form2_Load ...
- app测试自动化之打开简书的登录界面,等待五秒后关闭
from appium import webdriverfrom time import *desired_caps={ -----desired_caps为自定义变量名 'platformName' ...
- Javascript 广告浮动效果在浏览器中间N秒后移动到右下角
Javascript 广告浮动效果在浏览器中间N秒后移动到右下角 闲着无聊做了一个,本人原创...就是这个页面的广告效果....怎么样???? 刚刚学习的javascript
- 更新记录后关闭子窗口并刷新父窗口的Javascript
有时我们需要在新打开的窗口里面编辑信息,等编辑完了,需要将当前窗口关闭并且刷新父窗口,以使修改生效,本文就是介绍用 javascript 来实现"更新记录后关闭子窗口并刷新父窗口" ...
- Kafka:ZK+Kafka+Spark Streaming集群环境搭建(五)针对hadoop2.9.0启动之后发现slave上正常启动了DataNode,DataManager,但是过了几秒后发现DataNode被关闭
启动之后发现slave上正常启动了DataNode,DataManager,但是过了几秒后发现DataNode被关闭 以slave1上错误日期为例查看错误信息: /logs/hadoop-spark- ...
- Duilib 实现右下角弹出像QQ新闻窗口,3秒后窗口透明度渐变最后关闭,若在渐变过程中鼠标放到窗口上,窗口恢复最初状态(二)
效果: 1.定义两个个定时器ID #define ID_TIMER_DISPLAY_DELAY 30 #define ID_TIMER_DISPLAY_CLOSE 40 2.添加一个成员函数和成员变量 ...
- js弹框3秒后自动消失
开发中有时候会需要最出弹框后,过几秒自动消失的效果,下面给大家分享一下我自己做的一个小案例. 案例中的弹框使用的是bootstrap里面的模态框,实现自动消失则用的是js中的setInterval方法 ...
- JS脚本实现CSDN免登陆免关闭广告插件自动展开“阅读更多”内容
最近在CSDN查资料,总是弹出以下弹窗,然后就自动跳转到登录页面,蛋疼! 于是重新捣腾了一下,修改了原来的脚本,最新的脚本代码如下: 温馨提示:在打开CSDN页面后立刻执行以下脚本即可免登陆免关闭广告 ...
随机推荐
- SQL语句及5.7.2 mysql 用户管理
一.用户的定义 1.1 用户名+主机域 此处为5.7.2版本的mysql当中password字段已改为authentication_string mysql> select user,host, ...
- HDU 1236 排名(Microsoft_zzt)
http://acm.hdu.edu.cn/showproblem.php?pid=1236 Problem Description 今天的上机考试虽然有实时的Ranklist,但上面的排名只是根据完 ...
- IIS7开启gZip动态压缩
1.安装动态压缩模块: 安装过程可能的报错:This application has requested the Runtime to terminate it in an unusual way. ...
- Vue 初识Vue
<!DOCTYPE html><html lang="zh-cn"><head> <meta charset="utf-8&qu ...
- Python装饰器的深入理解
装饰器 #装饰器:本质上是函数,(装饰其他函数)就是为其他函数添加附加功能 #原则: 1.不能修改被装饰的函数的源代码 # 2.不能修改被装饰的函数的调用方式 #实现装饰器知识储备 #1.函数即变量 ...
- reshape、shuffle、save_weights
#-*- coding: utf-8 -*- import pandas as pd from random import shuffle import matplotlib.pyplot as pl ...
- python---集合及深浅copy
一.集合 相信大家都在数学中接触过集合,在python中集合也是有这相同的性质,1.去重,集合会将内部元素自定去重 2.关系测试,类似数学中的交集并集子集一样 1.1如何创建集合 集合在python中 ...
- ansible创建vmware虚拟机
环境:vmware 虚拟化需求:如果业务部门一次提几十台甚至几百台虚拟机需求,一个个的手动创建肯定耗时 使用ansible vmware_guest 创建虚拟机,避免手动一台一台创建的纯手工 工作废话 ...
- Popular Cows POJ - 2186(强连通分量)
Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10, ...
- Application Server not specified
IDEA使用tomcat启动web项目,配置页面报错Application Server not specified: 那是因为没有配置tomcat,只要配置一下就好了: