canvas随机绘制好看的树效果代码
代码语言:html
所属分类:其他
代码描述:canvas随机绘制好看的树效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
background: #fffbed;
}
.footer {
position: absolute;
bottom: 0;
right: 0;
font-family: monospace;
color: #000;
padding: 10px;
font-size: 12px;
}
/* -------------------------------------- */
.leaf {
position: absolute;
width: 5px;
height: 5px;
background-color: #fff;
border-radius: 2px;
box-shadow: 0px 0px 2px 0px rgb(255, 255, 255);
}
.fruit {
background-color: #e66e4a;
width: 10px;
height: 10px;
border-radius: 50%;
box-shadow: 0px 0px 4px 1px rgb(255, 102, 0);
z-index: 1;
}
body {
overflow: hidden;
}
body::after {
content: "";
display: block;
width: 80vh;
height: 80vh;
max-height: 100vw;
max-width: 100vw;
background-color: #2a574d;
position: absol.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0