首页 技术 正文
技术 2022年11月15日
0 收藏 352 点赞 3,326 浏览 2654 个字

参考别人的,自己改写了下,很好用。

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<title>Bootstrap 101 Template</title> <!-- Bootstrap -->
<!-- <link href="styles/bootstrap/bootstrap.min.css" rel="external nofollow" rel="stylesheet"> -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="external nofollow" >
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
*{
margin:0;padding:0; -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-tap-highlight-color: rgba(210,210,210,0.35); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
}
body{
font-family:"微软雅黑";
font-size:12px;
}
ul,li{
list-style:none;
} .toast-content{
z-index:1003;
font-size: 1.37em;
position: fixed;
bottom:50%;
width: 100%;
opacity:0;
height: 24px;
display: none;
transition: opacity 1s ease-out;
}
.huati_btn{
width:175px; height:32px;
background:#34a0f0;
border-radius:3px;
font:14px/32px "微软雅黑";
display:block;
overflow:hidden;
margin:0 auto;
text-align:center;
color:#fff;
text-decoration:none;
}
.huati{height:40px;
padding-top:9px;
border-bottom:1px dashed #cecece
}
</style>
</head>
<body>
<p class="huati"><a href="#" rel="external nofollow" id='huati_btu' class="huati_btn">测试一下</a></p>
<div id="toast-content" class="toast-content" style="display: none; opacity: 0;"></div> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery/jquery-2.1.4.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap/bootstrap-3.3.5.min.js"></script>
<script src="js/zepto/zepto.min.js"></script>
<script>
Zepto(function($){
var toast_time = null;
var display_time = null; function startToast(html){
if(toast_time!=null){
clearTimeout(toast_time);
clearTimeout(dispaly_time);
} $('#toast-content').css('display', 'block');
$('#toast-content').css('opacity', 1);
$('#toast-content').html(html); toast_time = setTimeout(function(){
$('#toast-content').css('opacity', 0);
display_time = setTimeout(function(){
$('#toast-content').css('display', 0);
}, 2000)
}, 1000);
} function test(){
startToast('<div style="color:#fff;background: rgba(0, 0, 0, 0.6);border-radius: 2px;padding: 2px;text-align: center;width:175px;margin: 0 auto;">话题征集内容不能为空</div>');
} test();
}) </script>
</body>
</html>
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,492
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,493
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,294