哄她开心的圣诞树html源码,复制粘贴就能实现~
以下是一个简单的HTML源代码示例,用于创建一棵有着彩虹般颜色的圣诞树,并且可以通过复制粘贴到你的网页上即可使用:
<!DOCTYPE html>
<html>
<head>
<title>Christmas Tree</title>
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
}
.tree-container {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background-color: #563c0d;
}
.tree {
width: 200px;
height: 300px;
background-color: #563c0d;
border-radius: 50px;
position: relative;
animation: shake 5s infinite;
}
.tree::before {
content: '';
position: absolute;
bottom: -50px;
left: 50px;
width: 80px;
height: 80px;
background-color: #563c0d;
border-radius: 50%;
}
.tree::after {
content: '';
position: absolute;
bottom: -70px;
left: 30px;
width: 10px;
height: 30px;
background-color: #563c0d;
border-radius: 50%;
}
.lights {
position: absolute;
bottom: -50px;
left: 50%;
transform: translateX(-50%);
width: 120px;
height: 120px;
background: radial-gradient(circle at center
评论已关闭