html仿Android的Toast功能
来源:互联网 发布:舵手医药软件 编辑:程序博客网 时间:2024/06/05 09:53
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>自定义Toast,类似于android的Toast</title><style>body { font-family: 'Lucida Grande', 'Helvetica', sans-serif;}</style><script>//自定义弹框function Toast(msg,duration){duration=isNaN(duration)?3000:duration;var m = document.createElement('div');m.innerHTML = msg;m.style.cssText="width:60%; min-width:150px; background:#000; opacity:0.5; height:40px; color:#fff; line-height:40px; text-align:center; border-radius:5px; position:fixed; top:40%; left:20%; z-index:999999; font-weight:bold;"; document.body.appendChild(m);setTimeout(function() {var d = 0.5; m.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in'; m.style.opacity = '0';setTimeout(function() { document.body.removeChild(m) }, d * 1000);}, duration);}</script> </head><body><button onclick="Toast('您点击了弹框按钮!',2000);">Toast</button></body></html>
1 0
- html仿Android的Toast功能
- html 自定义提示框,仿android的Toast功能
- html仿android的Toast功能:自定义淡出提示框
- Cocos2d-x实现Android的Toast功能
- Cocos2d-x实现Android的Toast功能
- Cocos2d-x实现Android的Toast功能
- Jquery 仿 android Toast效果
- iOS 仿Android Toast效果
- IOS控件列---仿Android的Toast提示信息
- Cocos2dx杂记:仿Android提示Toast
- 微信小程序自定义控件--toast(仿Android)
- VC++实现android的Toast消息框的功能
- toast(uiview) 类似于android的iostoast功能实现
- ionic实现Android下拉更新时的Toast功能
- unity 如何实现安卓Android的toast功能
- 仿MIUI的Toast动画效果实现
- IOS 基于Swift的弹出提示框(仿Android的Toast 和等待提示框)
- Toast的功能和用法
- Makefile 文件的编写
- (4.2.15)【android开源工具】Android画柱状图
- YYTools
- TCP慢启动
- (hdu step 5.3.1)敌兵布阵(线段树:单点更新)
- html仿Android的Toast功能
- Oracle 左侧补齐函数lpad 函数 (不积跬步,无以至千里)
- (4.2.15.1)【android开源工具】安卓图表引擎AChartEngine(三) - 示例源码折线图、饼图和柱状图
- vlc 源码和so库
- 查找代码关联关系之oracle篇
- Android ViewFlow的学习
- SIMD简介
- Classes, Objects, and Methods
- dom4j-----解析xml工具类