用css实现液晶数字格式显示效果,可通过点击按钮来控制数字大小和递增显示,很实用的css液晶字体显示特效。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>css实现液晶数字放大递增显示特效_武鸣人</title> <style type="text/css" title=""> body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;} #wwwwumingren{margin:100px auto;width:600px;} .clock{font-size:18px;width:9em;height:14em;border:1px solid #ddd;position:relative;} .clock div{position: absolute;border-style:solid;} .clock .l,.clock .r,.clock .u,.clock .d{width:0;height:0;overflow:hidden;} .clock .v{width:0;height:5em;border-width:0 0.5em;border-color:#565656;} .clock .v .u{border-style:dotted dotted solid dotted;border-width:0 0.5em 0.5em;border-color:transparent transparent #565656 transparent;top:-0.5em;left:-0.5em;} .clock .v .d{border-style:solid dotted dotted dotted;border-width:0.5em 0.5em 0 0.5em;border-color:#565656 transparent transparent transparent;left:-0.5em;bottom:-0.5em} .clock .h{width:5.5em;height:0;border-width:0.5em 0;border-color:#565656;} .clock .h .l{border-style:dotted solid dotted dotted;border-width:0.5em 0.5em 0.5em 0;border-color:transparent #565656 transparent transparent;top:-0.5em;left:-0.5em;} .clock .h .r{border-style:dotted dotted dotted solid;border-width:0.5em 0 0.5em 0.5em;border-color:transparent transparent transparent #565656;top:-0.5em;right:-0.5em;} .clock .n1{left:0.5em;top:1.5em;} .clock .n2{left:0.5em;top:7.5em;} .clock .n4{left:7.5em;top:7.5em;} .clock .n5{left:7.5em;top:1.5em;} .clock .n6{top:0.4em;left:1.8em;} .clock .n3{top:12.5em;left:1.8em;} .clock .n7{top:6.5em;left:1.8em;} .c1 .n1,.c1 .n2,.c1 .n3,.c1 .n6,.c1 .n7{display:none} .c2 .n1,.c2 .n4{display:none} .c3 .n1,.c3 .n2{display:none} .c4 .n2,.c4 .n3,.c4 .n6{display:none} .c5 .n2,.c5 .n5{display:none} .c6 .n5{display:none} .c7 .n1,.c7 .n2,.c7 .n3,.c7 .n7{display:none} .c8{} .c9 .n2{display:none} .c0 .n7{display:none} </style> <script type="text/javascript" language="javascript" > var num=0,size=1; function addNumber(){ var clock=document.getElementById("wwwwumingren").children[0]; clock.className="clock c"+(++num % 10); return false; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function resize(){ var clock=document.getElementById("wwwwumingren").children[0]; clock.style.fontSize=(++size % 20)+"px"; return false; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </script> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <div id="wwwwumingren"> <div class="clock c0"> <div class="v n1"><div class="u"></div><div class="d"></div></div> <div class="v n2"><div class="u"></div><div class="d"></div></div> <div class="h n3"><div class="l"></div><div class="r"></div></div> <div class="v n4"><div class="u"></div><div class="d"></div></div> <div class="v n5"><div class="u"></div><div class="d"></div></div> <div class="h n6"><div class="l"></div><div class="r"></div></div> <div class="h n7"><div class="l"></div><div class="r"></div></div> </div> </div> <input type="button" value="改变大小" onclick="resize()" /> <input type="button" value="数字累加" onclick="addNumber()" /> </body> </html>
本文来自武鸣人网站,转载请注明出处