今天无意间看到了一个网站介绍H5,canvas正方体旋转。感觉挺牛的,特地放这,大家一块学习。
原网址:http://wow.techbrood.com/fiddle/12093
<pre name="code" class="html"><!-- HTML5 -->
<!DOCTYPE html>
<html>
<head>
<title>H5立方体悬浮</title>
<meta name="author" content="rainna" />
<meta name="keywords" content="rainna's js lib" />
<meta name="description" content="H5立方体悬浮" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style>
* {
margin: 0;
padding: 0;
background: white;
}
body {
overflow: hidden;
}
form {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: #efefef;
padding: 1em;
tex