定时收缩的jquery指示器特效代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 定时收缩的jquery指示器特效代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

定时收缩的jquery指示器特效代码

HTML代码(index.html):

<!DOCTYPE html>
<html lang="en">
    <head>
		<meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
        <title>Timed Notifications with CSS Animations</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
        <meta name="description" content="Timed Notifications with CSS Animations" />
        <meta name="keywords" content="css3, animations, css, notification, timed, duration, box, overlay" />
        <meta name="author" content="Codrops" />
        <link rel="shortcut icon" href="../favicon.ico"> 
        <link rel="stylesheet" type="text/css" href="css/demo.css" />
        <link rel="stylesheet" type="text/css" href="css/style.css" />
		<link href='http://fonts.googleapis.com/css?family=Alegreya+SC:700,400italic' rel='stylesheet' type='text/css' />
		<script type="text/javascript" src="js/modernizr.custom.39460.js"></script> 
    </head>
    <body>
        <div class="container">
			<header>
				<div class="support-note"><!-- let's check browser support with modernizr -->
					<span class="no-cssanimations">CSS animations are not supported in your browser</span>
					<span class="no-csstransforms">CSS transforms are not supported in your browser</span>
					<!--span class="no-csstransforms3d">CSS 3D transforms are not supported in your browser</span-->
					<!--span class="no-csstransitions">CSS transitions are not supported in your browser</span-->
					<span class="note-ie">Sorry, only modern browsers.</span>
				</div>
			</header>
			
			<input type="checkbox" class="fire-check" />
			<button class="fire">Activate me</button>
			
			<section>
			
	            <div class="tn-box tn-box-color-1">
					<p>Your settings have been saved successfully!</p>
					<div class="tn-progress"></div>
				</div>
				
				<div class="tn-box tn-box-color-2">
					<p>Yummy! I just ate your settings! They were delicious!</</p>
					<div class="tn-progress"></div>
				</div>
				
				<div class="tn-box tn-box-color-3">
					<p>Look at me! I take much longer!<p>
					<div class="tn-progress"></div>
				</div>
				
			</section>
        </div>
    </body>
</html>







JS代码(modernizr.custom.39460.js):

/* Modernizr 2.5.3 (Custom Build) | MIT & BSD * Build:http://modernizr.com/download/#-cssanimations-generatedcontent-csstransforms-csstransforms3d-csstransitions-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load */
;
	window.Modernizr=function(a,b,c){
	function A(a){
	j.cssText=a}
function B(a,b){
	return A(n.join(a+";
	")+(b||""))}
function C(a,b){
	return typeof a===b}
function D(a,b){
	return!!~(""+a).indexOf(b)}
function E(a,b){
	for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;
	return!1}
function F(a,b,d){
	for(var e in a){
	var f=b[a[e]];
	if(f!==c)return d===!1?a[e]:C(f,"function")?f.bind(d||b):f}
return!1}
function G(a,b,c){
	var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+p.join(d+" ")+d).split(" ");
	return C(b,"string")||C(b,"undefined")?E(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),F(e,b,c))}
var d="2.5.3",e={
}
,f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l=":)",m={
}
.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={
}
,s={
}
,t={
}
,u=[],v=u.slice,w,x=function(a,c,d,e){
	var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");
	if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);
	return f=["&#173;
	","<style>",a,"</style>"].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i}
,y={
}
.hasOwnProperty,z;
	!C(y,"undefined")&&!C(y.call,"undefined")?z=function(a,b){
	return y.call(a,b)}
:z=function(a,b){
	return b in a&&C(a.constructor.prototype[b],"undefined")}
,Function.prototype.bind||(Function.prototype.bind=function(b){
	var c=this;
	if(typeof c!="function")throw new TypeError;
	var d=v.call(arguments,1),e=function(){
	if(this instanceof e){
	var a=function(){
}
;
	a.prototype=c.prototype;
	var f=new a,g=c.apply(f,d.concat(v.call(arguments)));
	return Object(g)===g?g:f}
return c.apply(b,d.concat(v.call(arguments)))}
;
	return e}
);
	var H=function(a,c){
	var d=a.join(""),f=c.length;
	x(d,function(a,c){
	var d=b.styleSheets[b.styleSheets.length-1],g=d?d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"":"",h=a.childNodes,i={
}
;
	while(f--)i[h[f].id]=h[f];
	e.csstransforms3d=(i.csstransforms3d&&i.csstransforms3d.offsetLeft)===9&&i.csstransforms3d.offsetHeight===3,e.generatedcontent=(i.generatedcontent&&i.generatedcontent.offsetHeight)>=1}
,f,c)}
([,["@media (",n.join("transform-3d),("),h,")","{
	#csstransforms3d{
	left:9px;
	position:absolute;
	height:3px;
}
}
"].join(""),['#generatedcontent:after{
	content:"',l,'";
	visibility:hidden}
'].join("")],[,"csstransforms3d","generatedcontent"]);
	r.cssanimations=function(){
	return G("animationName")}
,r.csstransforms=function(){
	return!!G("transform")}
,r.csstransforms3d=function(){
	var a=!!G("perspective");
	return a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d),a}
,r.csstransitions=function(){
	return G("transition")}
,r.generatedcontent=function(){
	return e.generatedcontent}
;
	for(var I in r)z(r,I)&&(w=I.toLowerCase(),e[w]=r[I](),u.push((e[w]?"":"no-")+w));
	return A(""),i=k=null,function(a,b){
	function g(a,b){
	var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;
	return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}
function h(){
	var a=k.elements;
	return typeof a=="string"?a.split(" "):a}
function i(a){
	var b={
}
,c=a.createElement,e=a.createDocumentFragment,f=e();
	a.createElement=function(a){
	var e=(b[a]||(b[a]=c(a))).cloneNode();
	return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e}
,a.createDocumentFragment=Function("h,f","return function(){
	var n=f.cloneNode(),c=n.createElement;
	h.shivMethods&&("+h().join().replace(/\w+/g,function(a){
	return b[a]=c(a),f.createElement(a),'c("'+a+'")'}
)+");
	return n}
")(k,f)}
function j(a){
	var b;
	return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{
	display:block}
audio{
	display:none}
canvas,video{
	display:inline-block;
	*display:inline;
	*zoom:1}
[hidden]{
	display:none}
audio[controls]{
	display:inline-block;
	*display:inline;
	*zoom:1}
mark{
	background:#FF0;
	color:#000}
")),f||(b=!i(a)),b&&(a.documentShived=b),a)}
var c=a.html5||{
}
,d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;
	(function(){
	var a=b.createElement("a");
	a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){
	try{
	b.createElement("a")}
catch(a){
	return!0}
var c=b.createDocumentFragment();
	return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}
()}
)();
	var k={
	elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j}
;
	a.html5=k,j(b)}
(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.testProp=function(a){
	return E([a])}
,e.testAllProps=G,e.testStyles=x,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}
(this,this.document),function(a,b,c){
	function d(a){
	return o.call(a)=="[object Function]"}
function e(a){
	return typeof a=="string"}
function f(){
}
function g(a){
	return!a||a=="loaded"||a=="complete"||a=="uninitialized"}
function h(){
	var a=p.shift();
	q=1,a?a.t?m(function(){
	(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)}
,0):(a(),h()):q=0}
function i(a,c,d,e,f,i,j){
	function k(b){
	if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){
	a!="img"&&m(function(){
	t.removeChild(l)}
,50);
	for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}
}
var j=j||B.errorTimeout,l={
}
,o=0,r=0,u={
	t:d,s:c,e:f,a:i,x:j}
;
	y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){
	k.call(this,r)}
,p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}
function j(a,b,c,d,f){
	return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}
function k(){
	var a=B;
	return a.loader={
	load:j,i:0}
,a}
var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={
}
.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){
	return o.call(a)=="[object Array]"}
,x=[],y={
}
,z={
	timeout:function(a,b){
	return b.length&&(a.timeout=b[0]),a}
}
,A,B;
	B=function(a){
	function b(a){
	var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={
	url:c,origUrl:c,prefixes:a}
,e,f,g;
	for(f=0;
	f<d;
	f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));
	for(f=0;
	f<b;
	f++)c=x[f](c);
	return c}
function g(a,e,f,g,i){
	var j=b(a),l=j.autoCallback;
	j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){
	k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2}
)))}
function i(a,b){
	function c(a,c){
	if(a){
	if(e(a))c||(j=function(){
	var a=[].slice.call(arguments);
	k.apply(this,a),l()}
),g(a,j,b,0,h);
	else if(Object(a)===a)for(n in m=function(){
	var b=0,c;
	for(c in a)a.hasOwnProperty(c)&&b++;
	return b}
(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){
	var a=[].slice.call(arguments);
	k.apply(this,a),l()}
:j[n]=function(a){
	return function(){
	var b=[].slice.call(arguments);
	a&&a.apply(this,b),l()}
}
(k[n])),g(a[n],j,b,n,h))}
else!c&&l()}
var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;
	c(h?a.yep:a.nope,!!i),i&&c(i)}
var j,l,m=this.yepnope.loader;
	if(e(a))g(a,0,m,0);
	else if(w(a))for(j=0;
	j<a.length;
	j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);
	else Object(a)===a&&i(a,m)}
,B.addPrefix=function(a,b){
	z[a]=b}
,B.addFilter=function(a){
	x.push(a)}
,B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){
	b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"}
,0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){
	var k=b.createElement("script"),l,o,e=e||B.errorTimeout;
	k.src=a;
	for(o in d)k.setAttribute(o,d[o]);
	c=j?h:c||f,k.onreadystatechange=k.onload=function(){
	!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)}
,m(function(){
	l||(l=1,c(1))}
,e),i?k.onload():n.parentNode.insertBefore(k,n)}
,a.yepnope.injectCss=function(a,c,d,e,g,i){
	var e=b.createElement("link"),j,c=i?h:c||f;
	e.href=a,e.rel="stylesheet",e.type="text/css";
	for(j in d)e.setAttribute(j,d[j]);
	g||(n.parentNode.insertBefore(e,n),m(c,0))}
}
(this,document),Modernizr.load=function(){
	yepnope.apply(window,[].slice.call(arguments,0))}
;
	

CSS代码(demo.css):

@import url('normalize.css');/* General Demo Style */
body{font-family:Cambria,Palatino,"Palatino Linotype","Palatino LT STD",Georgia,serif;background:#fff url(../images/bg.jpg) repeat top left;font-weight:400;font-size:15px;color:#333;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;font-smoothing:antialiased;}
a{color:#555;text-decoration:none;}
.clr{clear:both;padding:0;height:0;margin:0;}
.container{width:100%;position:relative;min-height:750px;text-align:center;}
.container > header{margin:10px 10px 0px 10px;padding:20px 10px 0px 10px;position:relative;display:block;text-shadow:1px 1px 1px rgba(0,0,0,0.2);text-align:center;}
.container > header > span{font-size:20px;line-height:20px;display:block;font-weight:400;font-style:italic;color:#719dab;text-shadow:1px 1px 1px rgba(0,0,0,0.1);font-family:'Alegreya SC',Georgia,serif;}
.container > header h1{font-size:36px;line-height:36px;margin:0;position:relative;font-weight:300;color:#498ea5;padding:5px 0px;text-shadow:1px 1px 1px rgba(255,255,255,0.7);}
.container > header h1 span{font-weight:700;}
.container > header h2{font-size:14px;font-weight:300;letter-spacing:2px;text-transform:uppercase;margin:0;padding:15px 0 5px 0;color:#6190ca;text-shadow:1px 1px 1px rgba(255,255,255,0.7);}
.container > header p{font-style:italic;color:#aaa;text-shadow:1px 1px 1px rgba(255,255,255,0.7);}
/* Header Style */
.codrops-top{text-align:left;line-height:24px;font-size:11px;background:#fff;background:rgba(255,255,255,0.7);text-transform:uppercase;z-index:9999;position:relative;font-family:Cambria,Georgia,serif;box-shadow:1px 0px 2px rgba(0,0,0,0.2);}
.codrops-top a{padding:0px 10px;letter-spacing:1px;color:#333;display:inline-block;}
.codrops-top a:hover{background:rgba(255,255,255,0.3);}
.codrops-top span.right{float:right;}
.codrops-top span.right a{float:left;display:block;}
.support-note span{color:#ac375d;font-size:16px;display:none;font-weight:bold;text-align:center;padding:5px 0;}
.no-cssanimations .support-note span.no-cssanimations,.no-csstransforms .support-note span.no-csstransforms,.no-csstransforms3d .support-note span.no-csstransforms3d,.no-csstransitions .support-note span.no-csstransitions{display:block;}
button.fire{color:#fff;display:inline-block;margin:5px auto 30px auto;border-radius:4px;padding:0px 15px;height:30px;line-height:30px;width:160px;font-family:Cambria,Palatino,"Palatino Linotype","Palatino LT STD",Georgia,serif;;font-weight:bold;font-size:13px;text-shadow:0 1px 1px rgba(0,0,0,0.3);border:1px solid #377a90;background:#6fafc4;/* Old browsers */
background:-moz-linear-gradient(top,#6fafc4 0%,#498ea5 100%);/* FF3.6+ */
background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#6fafc4),color-stop(100%,#498ea5));/* Chrome,Safari4+ */
background:-webkit-linear-gradient(top,#6fafc4 0%,#498ea5 100%);/* Chrome10+,Safari5.1+ */
background:-o-linear-gradient(top,#6fafc4 0%,#498ea5 100%);/* Opera 11.10+ */
background:-ms-linear-gradient(top,#6fafc4 0%,#498ea5 100%);/* IE10+ */
background:linear-gradient(top,#6fafc4 0%,#498ea5 100%);/* W3C */
filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#6fafc4',endColorstr='#498ea5',GradientType=0 );/* IE6-9 */
box-shadow:0 1px 1px rgba(0,0,0,0.1);z-index:10;}
input.fire-check:hover + button.fire{box-shadow:0 1px 3px rgba(0,0,0,0.4);}
input.fire-check:checked + button.fire{color:#377a90;border-color:#4991a9;text-shadow:0 1px 1px rgba(255,255,255,0.6);background:#94cde0;text-shadow:0px 1px 1px rgba(255,255,255,0.4);box-shadow:0px 1px 1px rgba(255,255,255,0.5);}
input.fire-check{width:160px;position:absolute;left:50%;margin-left:-80px;height:35px;cursor:pointer;opacity:0;z-index:100;}
.no-cssanimations button.fire,.no-cssanimations input.fire-check{display:none;}

CSS代码(normalize.css):

/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* ============================================================================= HTML5 display definitions ========================================================================== */
/* * Corrects block display not defined in IE6/7/8/9 & FF3 */
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block;}
/* * Corrects inline-block display not defined in IE6/7/8/9 & FF3 */
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
/* * Prevents modern browsers from displaying 'audio' without controls * Remove excess height in iOS5 devices */
audio:not([controls]){display:none;height:0;}
/* * Addresses styling for 'hidden' attribute not present in IE7/8/9,FF3,S4 * Known issue:no IE6 support */
[hidden]{display:none;}
/* ============================================================================= Base ========================================================================== */
/* * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units * http://clagnut.com/blog/348/#c790 * 2. Prevents iOS text size adjust after orientation change,without disabling user zoom * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */
html{font-size:100%;/* 1 */
 -webkit-text-size-adjust:100%;/* 2 */
 -ms-text-size-adjust:100%;/* 2 */
}
/* * Addresses font-family inconsistency between 'textarea' and other form elements. */
html,button,input,select,textarea{font-family:sans-serif;}
/* * Addresses margins handled incorrectly in IE6/7 */
body{margin:0;}
/* ============================================================================= Links ========================================================================== */
/* * Addresses outline displayed oddly in Chrome */
a:focus{outline:thin dotted;}
/* * Improves readability when focused and also mouse hovered in all browsers * people.opera.com/patrickl/experiments/keyboard/test */
a:hover,a:active{outline:0;}
/* ============================================================================= Typography ========================================================================== */
/* * Addresses font sizes and margins set differently in IE6/7 * Addresses font sizes within 'section' and 'article' in FF4+,Chrome,S5 */
h1{font-size:2em;margin:0.67em 0;}
h2{font-size:1.5em;margin:0.83em 0;}
h3{font-size:1.17em;margin:1em 0;}
h4{font-size:1em;margin:1.33em 0;}
h5{font-size:0.83em;margin:1.67em 0;}
h6{font-size:0.75em;margin:2.33em 0;}
/* * Addresses styling not present in IE7/8/9,S5,Chrome */
abbr[title]{border-bottom:1px dotted;}
/* * Addresses style set to 'bolder' in FF3+,S4/5,Chrome*/
b,strong{font-weight:bold;}
blockquote{margin:1em 40px;}
/* * Addresses styling not present in S5,Chrome */
dfn{font-style:italic;}
/* * Addresses styling not present in IE6/7/8/9 */
mark{background:#ff0;color:#000;}
/* * Addresses margins set differently in IE6/7 */
p,pre{margin:1em 0;}
/* * Corrects font family set oddly in IE6,S4/5,Chrome * en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
pre,code,kbd,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em;}
/* * Improves readability of pre-formatted text in all browsers */
pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
/* * 1. Addresses CSS quotes not supported in IE6/7 * 2. Addresses quote property not supported in S4 */
/* 1 */
q{quotes:none;}
/* 2 */
q:before,q:after{content:'';content:none;}
small{font-size:75%;}
/* * Prevents sub and sup affecting line-height in all browsers * gist.github.com/413930 */
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
sup{top:-0.5em;}
sub{bottom:-0.25em;}
/* ============================================================================= Lists ========================================================================== */
/* * Addresses margins set differently in IE6/7 */
dl,menu,ol,ul{margin:1em 0;}
dd{margin:0 0 0 40px;}
/* * Addresses paddings set differently in IE6/7 */
menu,ol,ul{padding:0 0 0 40px;}
/* * Corrects list images handled incorrectly in IE7 */
nav ul,nav ol{list-style:none;list-style-image:none;}
/* ============================================================================= Embedded content ========================================================================== */
/* * 1. Removes border when inside 'a' element in IE6/7/8/9,FF3 * 2. Improves image quality when scaled in IE7 * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
img{border:0;/* 1 */
 -ms-interpolation-mode:bicubic;/* 2 */
}
/* * Corrects overflow displayed oddly in IE9 */
svg:not(:root){overflow:hidden;}
/* ============================================================================= Figures ========================================================================== */
/* * Addresses margin not present in IE6/7/8/9,S5,O11 */
figure{margin:0;}
/* ============================================================================= Forms ========================================================================== */
/* * Corrects margin displayed oddly in IE6/7 */
form{margin:0;}
/* * Define consistent border,margin,and padding */
fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}
/* * 1. Corrects color not being inherited in IE6/7/8/9 * 2. Corrects text not wrapping in FF3 * 3. Corrects alignment displayed oddly in IE6/7 */
legend{border:0;/* 1 */
 padding:0;white-space:normal;/* 2 */
 *margin-left:-7px;/* 3 */
}
/* * 1. Corrects font size not being inherited in all browsers * 2. Addresses margins set differently in IE6/7,FF3+,S5,Chrome * 3. Improves appearance and consistency in all browsers */
button,input,select,textarea{font-size:100%;/* 1 */
 margin:0;/* 2 */
 vertical-align:baseline;/* 3 */
 *vertical-align:middle;/* 3 */
}
/* * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet */
button,input{line-height:normal;/* 1 */
}
/* * 1. Improves usability and consistency of cursor style between image-type 'input' and others * 2. Corrects inability to style clickable 'input' types in iOS * 3. Removes inner spacing in IE7 without affecting normal text inputs * Known issue:inner spacing remains in IE6 */
button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;/* 1 */
 -webkit-appearance:button;/* 2 */
 *overflow:visible;/* 3 */
}
/* * Re-set default cursor for disabled elements */
button[disabled],input[disabled]{cursor:default;}
/* * 1. Addresses box sizing set to content-box in IE8/9 * 2. Removes excess padding in IE8/9 * 3. Removes excess padding in IE7 Known issue:excess padding remains in IE6 */
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;/* 1 */
 padding:0;/* 2 */
 *height:13px;/* 3 */
 *width:13px;/* 3 */
}
/* * 1. Addresses appearance set to searchfield in S5,Chrome * 2. Addresses box-sizing set to border-box in S5,Chrome (include -moz to future-proof) */
input[type="search"]{-webkit-appearance:textfield;/* 1 */
 -moz-box-sizing:content-box;-webkit-box-sizing:content-box;/* 2 */
 box-sizing:content-box;}
/* * Removes inner padding and search cancel button in S5,Chrome on OS X */
input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
/* * Removes inner padding and border in FF3+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ */
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
/* * 1. Removes default vertical scrollbar in IE6/7/8/9 * 2. Improves readability and alignment in all browsers */
textarea{overflow:auto;/* 1 */
 vertical-align:top;/* 2 */
}
/* ============================================================================= Tables ========================================================================== */
/* * Remove most spacing between table cells */
table{border-collapse:collapse;border-spacing:0;}
/* Addition */
/* apply a natural box layout model to all elements */
/* By Paul Irish:http://paulirish.com/2012/box-sizing-border-box-ftw/ */
*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}

CSS代码(style.css):

.tn-box{width:360px;position:relative;margin:0 auto 20px auto;padding:25px 15px;text-align:left;border-radius:5px;box-shadow:0 1px 1px rgba(0,0,0,0.1),inset 0 1px 0 rgba(255,255,255,0.6);opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);cursor:default;display:none;}
.tn-box p{font-weight:bold;font-size:16px;margin:0;padding:0 10px 0 60px;text-shadow:0 1px 1px rgba(255,255,255,0.6);}
.tn-box p:before{text-align:center;border:3px solid rgba(255,255,255,1);margin-top:-17px;top:50%;left:20px;width:30px;content:'i';font-size:30px;color:rgba(255,255,255,1);position:absolute;height:30px;line-height:30px;border-radius:50%;text-shadow:1px 1px 1px rgba(0,0,0,0.1);box-shadow:1px 1px 1px rgba(0,0,0,0.1);}
.tn-progress{width:0;height:4px;background:rgba(255,255,255,0.3);position:absolute;bottom:5px;left:2%;border-radius:3px;box-shadow:inset 0 1px 1px rgba(0,0,0,0.05),0 -1px 0 rgba(255,255,255,0.6);}
/* Colors */
.tn-box-color-1{background:#ffe691;border:1px solid #f6db7b;}
.tn-box-color-1 p{color:#7d5912;}
.tn-box-color-2{background:#99ffb1;border:1px solid #7ce294;}
.tn-box-color-2 p{color:#2d8241;}
.tn-box-color-3{background:#dd9aff;border:1px solid #b367db;}
.tn-box-color-3 p{color:#69288b;}
/* Fire the animations */
input.fire-check:checked ~ section .tn-box{display:block;-webkit-animation:fadeOut 5s linear forwards;-moz-animation:fadeOut 5s linear forwards;-o-animation:fadeOut 5s linear forwards;-ms-animation:fadeOut 5s linear forwards;animation:fadeOut 5s linear forwards;}
input.fire-check:checked ~ section .tn-box .tn-progress{-webkit-animation:runProgress 4s linear forwards 0.5s;-moz-animation:runProgress 4s linear forwards 0.5s;-o-animation:runProgress 4s linear forwards 0.5s;-ms-animation:runProgress 4s linear forwards 0.5s;animation:runProgress 4s linear forwards 0.5s;}
/* If you use JavaScript you could add a class instead:*/
.tn-box.tn-box-active{display:block;-webkit-animation:fadeOut 5s linear forwards;-moz-animation:fadeOut 5s linear forwards;-o-animation:fadeOut 5s linear forwards;-ms-animation:fadeOut 5s linear forwards;animation:fadeOut 5s linear forwards;}
.tn-box.tn-box-active .tn-progress{-webkit-animation:runProgress 4s linear forwards 0.5s;-moz-animation:runProgress 4s linear forwards 0.5s;-o-animation:runProgress 4s linear forwards 0.5s;-ms-animation:runProgress 4s linear forwards 0.5s;animation:runProgress 4s linear forwards 0.5s;}
@-webkit-keyframes fadeOut{0%{opacity:0;}
10%{opacity:1;}
90%{opacity:1;-webkit-transform:translateY(0px);}
99%{opacity:0;-webkit-transform:translateY(-30px);}
100%{opacity:0;}
}
@-moz-keyframes fadeOut{0%{opacity:0;}
10%{opacity:1;}
90%{opacity:1;-moz-transform:translateY(0px);}
99%{opacity:0;-moz-transform:translateY(-30px);}
100%{opacity:0;}
}
@-o-keyframes fadeOut{0%{opacity:0;}
10%{opacity:1;}
90%{opacity:1;-o-transform:translateY(0px);}
99%{opacity:0;-o-transform:translateY(-30px);}
100%{opacity:0;}
}
@-ms-keyframes fadeOut{0%{opacity:0;}
10%{opacity:1;}
90%{opacity:1;-ms-transform:translateY(0px);}
99%{opacity:0;-ms-transform:translateY(-30px);}
100%{opacity:0;}
}
@keyframes fadeOut{0%{opacity:0;}
10%{opacity:1;}
90%{opacity:1;transform:translateY(0px);}
99%{opacity:0;transform:translateY(-30px);}
100%{opacity:0;}
}
@-webkit-keyframes runProgress{0%{width:0%;background:rgba(255,255,255,0.3);}
100%{width:96%;background:rgba(255,255,255,1);}
}
@-moz-keyframes runProgress{0%{width:0%;background:rgba(255,255,255,0.3);}
100%{width:96%;background:rgba(255,255,255,1);}
}
@-o-keyframes runProgress{0%{width:0%;background:rgba(255,255,255,0.3);}
100%{width:96%;background:rgba(255,255,255,1);}
}
@-ms-keyframes runProgress{0%{width:0%;background:rgba(255,255,255,0.3);}
100%{width:96%;background:rgba(255,255,255,1);}
}
@keyframes runProgress{0%{width:0%;background:rgba(255,255,255,0.3);}
100%{width:96%;background:rgba(255,255,255,1);}
}
/* Let's add some different durations for the demo */
input.fire-check:checked ~ section .tn-box:nth-child(2){-webkit-animation-duration:6s;-moz-animation-duration:6s;-o-animation-duration:6s;-ms-animation-duration:6s;animation-duration:6s;-webkit-animation-delay:0.2s;-moz-animation-delay:0.2s;-o-animation-delay:0.2s;-ms-animation-delay:0.2s;animation-delay:0.2s;}
input.fire-check:checked ~ section .tn-box:nth-child(2) .tn-progress{-webkit-animation-duration:5s;-moz-animation-duration:5s;-o-animation-duration:5s;-ms-animation-duration:5s;animation-duration:5s;-webkit-animation-delay:0.7s;-moz-animation-delay:0.7s;-o-animation-delay:0.7s;-ms-animation-delay:0.7s;animation-delay:0.7s;}
input.fire-check:checked ~ section .tn-box:nth-child(3){-webkit-animation-duration:9s;-moz-animation-duration:9s;-o-animation-duration:9s;-ms-animation-duration:9s;animation-duration:9s;-webkit-animation-delay:0.4s;-moz-animation-delay:0.4s;-o-animation-delay:0.4s;-ms-animation-delay:0.4s;animation-delay:0.4s;}
input.fire-check:checked ~ section .tn-box:nth-child(3) .tn-progress{-webkit-animation-duration:7.5s;-moz-animation-duration:7.5s;-o-animation-duration:7.5s;-ms-animation-duration:7.5s;animation-duration:7.5s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;animation-delay:0.9s;}
/* Last example pauses on hover (causes problems in WebKit browsers) */
.tn-box.tn-box-hoverpause:hover,.tn-box.tn-box-hoverpause:hover .tn-progress{-webkit-animation-play-state:paused;-moz-animation-play-state:paused;-o-animation-play-state:paused;-ms-animation-play-state:paused;animation-play-state:paused;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
27.75 KB
Html Js 菜单导航特效5
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章