<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HTML5 乡村旅馆闪烁的霓虹灯标牌</title>
<style>
@keyframes smoke {
from {
background-position: 0 50%;
}
to {
background-position: 100% 50%;
}
}
body {
margin: 0;
background: #0c191c url(images/bates-bg.jpg) 0 0/cover no-repeat fixed;
}
body:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(images/bates-smoke.png) 0 50%/auto 100%;
animation: smoke 90s infinite;
}
body:after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(images/bates-smoke-sm.png) 0 50%/auto 100%;
animation: smoke 30s infinite;
}
.header {
position: absolute;
bottom: -30px;
right: 5%;
width: 60%;
max-width: 700px;
z-index: 1;
}
.header img {
display: block;
width: 100%;
}
.header img.off {
position: absolute;
top: 0;
left: 0;
z-index: 2;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="header">
<img src="images/bates-on.png" />
<img src="images/bates-off.png" class="off" />
</div>
<script src="js/jquery-1.11.1.min.js"></script>
<script>
(function() {
var toggle = function(element) {
$("img.off").css({
"opacity": element ? "1" : "0"
});
};
function el() {
toggle(Math.random() > .8), setTimeout(el, 100 * Math.random() * .2);
}
el();
})();
</script>
</body>
</html>
HTML5实现烟雾笼罩下乡村旅馆闪烁的霓虹灯标牌动画效果源码.zip
版权申诉
84 浏览量
2022-11-04
23:41:35
上传
评论
收藏 1.47MB ZIP 举报
毕业_设计
- 粉丝: 1935
- 资源: 1万+
最新资源
- 下载安装这个软件.apk
- 【数据集详细解释及案例分析】数据集详细解释及案例分析
- 基于SHT71温湿度传感器、STM32F103C8T6、LCD1602温湿度采集显示系统proteus仿真设计
- 基于TH02温湿度传感器、STM32F103C8T6、LCD1602、FREERTOS的温湿度采集系统proteus仿真设计
- 【TCP-IP协议详细解释及案例分析】TCP-IP协议详细解释及案例分析
- 一文搞懂 LSTM(长短期记忆网络).rar
- 【autosar简介及基本案例解析】autosar简介及基本案例解析
- java模拟斗地主洗牌发牌
- springboot+vue登录系统 vue部分
- 常用常见 SQL语句语法
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈