白云岛资源网 Design By www.pvray.com
使用HTML5的canvas画的孙悟空,CSS3画的白云飘飘。
效果图:
代码如下:
CSS Code复制内容到剪贴板- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>HTML5+CSS3实现齐天大圣腾云驾雾</title>
- <style type="text/css">
- * {
- margin: 0;
- padding: 0;
- border: 0;
- }
- html, body {
- margin: 0;
- }
- @-webkit-keyframes STAR-MOVE {
- from {
- background-position: 0% 0%;
- }
- to {
- background-position: 600% 0%;
- }
- }
- @keyframes STAR-MOVE {
- from {
- background-position: 0% 0%;
- }
- to {
- background-position: 600% 0%;
- }
- }
- .wall {
- position: absolute;
- top: 0;
- left: 0;
- bottombottom: 0;
- rightright: 0;
- }
- div#background {
- background: black url('http://hovertree.com/texiao/html5/30/img/background.png') repeat-x 5% 0%;
- background-size: cover;
- -webkit-animation: STAR-MOVE 200s linear infinite;
- -moz-animation: STAR-MOVE 200s linear infinite;
- -ms-animation: STAR-MOVE 200s linear infinite;
- animation: STAR-MOVE 200s linear infinite;
- }
- div#midground {
- background: url('http://hovertree.com/texiao/html5/30/img/midground.png')repeat 20% 0%;
- z-index: 1;
- -webkit-animation: STAR-MOVE 100s linear infinite;
- -moz-animation: STAR-MOVE 100s linear infinite;
- -ms-animation: STAR-MOVE 100s linear infinite;
- animation: STAR-MOVE 100s linear infinite;
- }
- div#foreground {
- background: url('http://hovertree.com/texiao/html5/30/img/foreground.png')repeat 35% 0%;
- z-index: 2;
- -webkit-animation: STAR-MOVE 50s linear infinite;
- -moz-animation: STAR-MOVE 50s linear infinite;
- -ms-animation: STAR-MOVE 50s linear infinite;
- animation: STAR-MOVE 50s linear infinite;
- }#hovertreewk{position:absolute;z-index:9999;top:0px;bottombottom:0px;left:0px;rightright:0px;margin:auto;}
- </style>
- </head>
- <body>
- <div style="text-align:center;position:absolute;z-index:9;color:white"><h1>齐天大圣腾云驾雾</h1></div>
- <div id="background" class="wall"></div>
- <div id="midground" class="wall"></div>
- <div id="foreground" class="wall"></div>
- <canvas width="650" height="478" id="hovertreewk"></canvas>
- <script src="http://hovertree.com/texiao/html5/30/js/hovertreewk.js"></script>
- </body>
- </html>
关于HTML5+Canvas+CSS3实现齐天大圣孙悟空腾云驾雾的代码就给大家介绍完毕,希望对大家有所帮助!
白云岛资源网 Design By www.pvray.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
白云岛资源网 Design By www.pvray.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。