[css] 使用css3绘制一颗仙人掌
"以下是使用 CSS3 绘制一颗仙人掌的示例代码:

```html
<!DOCTYPE html>
<html>
<head>
<style>
.cactus {
width: 200px;
height: 300px;
background-color: #8BC34A;
position: relative;
border-radius: 50%;
overflow: hidden;
}

.thorn {
position: absolute;
bottom: 0;
width: 40px;
height: 100%;
background-color: #689F38;
transform-origin: 50% 100%;
transform: rotate(-45deg);
}

.thorn:before,
.thorn:after {
content: \"\";
position: absolute;
width: 40px;
height: 40px;
background-color: #689F38;
top: -20px;
}

.thorn:before {
left: -20px;
border-radius: 50% 50% 0 0;
}

.thorn:after {
right: -20px;
border-radius: 50% 50% 0 0;
}

.flower {
position: absolute;
width: 80px;
height: 80px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #F44336;
展开
1