HTML5+Canvas+CSS3实现齐天大圣孙悟空腾云驾雾效果
更新时间:2023-04-03 05:14:52 阅读: 评论:0
使用html5的canvas画的孙悟空,css3画的白云飘飘。
效果图:
代码如下:
css code
复制内容到剪贴板
<!doctypehtml> <html> <head> <metachart=“utf-8”> <metahttp-equiv=“x-ua-compatible”cont风很凉qq加密空间日志查看器ent=“ie=edge,chrome=1”> <metaname=“description”content=“”> <metaname=“viewport”content=“width=device-width,initial-scale=1”> <title>html5+css3实现齐天大圣腾云驾雾</title> <styletype=“text/css”> *{ margin:0; padding:0; border:0; } html,body{ margin:0; } @-webkit-keyframesstar-move{ from{ background-position:0%0%; } to{ background-position:600%0%; } } @keyframesstar-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:blackurl(‘/d/file/titlepic/background.png& background–size:cover; -webkit-animation:star-move200slinearinfinite; -moz-animation:star-move200slinearinfinite; -ms-animation:star-move200slinearinfinite; animation:star-move200slinearinfinite; } div#midgro手机配货und{ background:url(‘/d/file/titlepic/midground.png& 中美洲国家z-index:1; -webkit-animation:star-move100slinearinfinite; -moz-animation:star-move100slinearinfinite; -ms-animation:star-move100slinearinfinite; animation:star-move100slinearinfinite; } div#foreground{ background:url(‘/d/file/titlepic/foreground.png& z-index:2; -webkit-animation:star-move50slinearinfinite; -moz-animation:star-move50slinearinfinite; -ms-animation:star-move50slinearinfinite; animation:star-move50slinearinfinite; }#hovertreewk{position:absolute;z-index:9999;top:0px;bottombottom:0px;left:0px;rightright:0px;margin:auto高中化学书
;} </style> </head> <body> <divstyle=“text-align:center;position:absolute;z-index:9;color:white”><h1>齐天大圣腾云驾雾</h1></div> <divid=“background”class=“wall”></div> <divid=“midground”class=“wall”></div> <divid=“foreground”cget的过去分词lass=“wall”></div> <canvaswidth=“650”height=“478”id=“hovertreewk”></canvas> <scriptsrc=“/d/file/titlepic/hovertreewk.js& </body> </html>关于html5+canvas+css3实现齐天大圣孙悟空腾云驾雾的代码就给大家介绍完毕,希望对大家有所帮助!
本文word下载地址:HTML5+Canvas+CSS3实现齐天大圣孙悟空腾云驾雾效果.doc
本文 PDF 下载地址:HTML5+Canvas+CSS3实现齐天大圣孙悟空腾云驾雾效果.pdf