实例:旋转的圣诞树
技术栈:HTML CSS JS
效果:
源码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>旋转的圣诞树</title>
<link rel="stylesheet" href="../css/76.css">
</head>
<body>
<div class="star"></div>
<ul class="tree" id="tree"></ul>
<script>
function createTree() {
for (let i = 0; i < 128; i ) {
let li = document.createElement(