思路分析
- 点击事件:
- 添加元素到页面
- 存储数据
- 存储总数据条数
- 页面加载成功的时候:
- 读取数据
- 遍历数据
- 添加元素到页面
- CSS样式:
- 2D/3D 转换属性(Transform)
代码实现
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>任务清单</title>
<style type="text/css">
.right {
border: 1px solid red;
width: 100px;
height: 100px;
background-color: yellow;
padding: 15px;
box-sizing: border-box;
position: relative;
float: left;
margin: 15px;
transform: rotate(-10deg);
-ms-transform: rotate(-10deg);
-moz-transform: rotate(-10deg);