网页蒙层实现加载效果
2017-12-08 16:37
253 查看
最近做移动应用的 一个商城项目,需要实现一个全屏蒙层显示加载效果,记录下来,以免以后用的着,,效果图:
直接上代码:
直接上代码:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>半透明实例在线演示 </title> <style> @-webkit-keyframes rotation { from { -webkit-transform: rotate(0deg); } to { -webkit-transform: rotate(360deg); } } /* 1s表示图片旋转一圈的时间,**/ .Rotation { position: absolute; left: 30px; top: 15px; width: 70px; height: 70px; color: #F00; -webkit-transform: rotate(360deg); animation: rotation 1s linear infinite; -moz-animation: rotation 1s linear infinite; -webkit-animation: rotation 1s linear infinite; -o-animation: rotation 1s linear infinite; } /**图片的圆角*/ .img { border-radius: 70px; } /**opacity 透明度**/ .div-a { position: absolute; top: 0; bottom: 0;; width: 100%; height: 100%; filter: alpha(Opacity=60); -moz-opacity: 0.6; opacity: 0.6,; background: #CCCCCC; } .img-div{ position: relative; top: 40%; margin: 0 auto; width: 300px; height: 100px; background: #FFFFFF; text-align: center; border: 1px #E8E8E8 solid; } .loading{ display: inline-block; font-size: 28px; margin-left:40px ; line-height: 28px; margin-top: 36px; } </style> </head> <body> <!-- 使用的时候先让下面的这个div隐藏,到需要的时候用js让他显示出来就行了 --> <div class="div-a"> <div class="img-div"> <img class="Rotation img" src="loading.png" width="500" height="500" /><span class="loading">加载中...</span> </div> </div> </body> </html>
相关文章推荐
- 异步加载js文件并执行js方法:实现异步处理网页的复杂效果(转)
- 异步加载js文件并执行js方法:实现异步处理网页的复杂效果
- 异步加载js文件并执行js方法:实现异步处理网页的复杂效果
- 网页加载效果实现
- 实现 网页的 数据加载中.... 效果,很简单哦
- 通过JS和CSS,实现网页加载中的动画效果
- jQuery实现彩带延伸效果的网页加载条loading动画
- 关于网页载入,页面顶部显示页面加载线性进度条效果实现。
- 网页loading(加载)效果的实现
- 关于网页头部进度条的加载效果实现
- JS+CSS实现网页加载中的动画效果
- 网页正在加载中,效果实现
- jQuery实现彩带延伸效果的网页加载条loading动画
- php+ajax实现无刷新动态加载数据技术 - 测试用了,效果还行
- 开始游戏和加载游戏按钮的按下效果实现
- jQuery向下滚动即时加载内容实现的瀑布流效果
- asp.net gridview实现正在加载效果方案一
- 网页瀑布流效果实现的几种方式
- window.open方法打开网页没有带refer参数无法通过权限验证可通过这种方式实现open的效果
- swing实现一个类似网页视频列表横向滚动的效果