gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
用html+svg画一个独角兽
- User
用html+svg画一个独角兽
- Assistant
创建一个独角兽的SVG图像可以通过HTML和SVG元素实现。下面是一个简单的示例代码,展示了一个简单的独角兽轮廓。这个例子并不复杂,但它可以作为一个起点,你可以根据需要进一步调整和美化。
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>独角兽SVG</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #f0f8ff; } svg { width: 300px; height: 300px; } </style> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"> <path d="M100 160 Q 80 90, 130 90 Q 140 60, 160 90 Q 190 70, 200 130 Q 240 130, 230 180 Q 220 260, 150 240 Q 130 230, 120 210 Q 90 210, 100 160 Z" fill="white" stroke="black" stroke-width="2"/> <path d="M130 140 Q 125 120, 145 120 Q 155 110, 170 130" stroke="pink" stroke-width="4" fill="none"/> <circle cx="145" cy="160" r="5" fill="black"/><!-- 眼睛 --> <polygon points="160,80 170,10 165,30" fill="gold"/> <!-- 独角 --> </svg> </body> </html>代码说明:
- 这个HTML文件使用SVG绘制了一个简单的独角兽的轮廓,包含了马头、角以及一个简单的眼睛。
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.