html 表白代码 爱心树
时间: 2023-05-11 14:05:52 浏览: 319
以下是一个简单的 HTML 表白代码,包含一个爱心树:
```html
<!DOCTYPE html>
<html>
<head>
<title>表白</title>
<meta charset="UTF-8">
<style>
.tree {
position: relative;
width: 100px;
height: 100px;
}
.tree:before {
content: "";
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid red;
transform: translateX(-50%);
}
.tree:after {
content: "";
position: absolute;
top: 50px;
left: 0;
width: 100px;
height: 50px;
background-color: green;
border-radius: 50px 50px 0 0;
}
</style>
</head>
<body>
<div class="tree"></div>
<p>我喜欢你,愿我们的爱情像这棵爱心树一样茁壮成长!</p>
</body>
</html>
```
希望这个代码能帮助你表达你的爱意!
阅读全文