写一份有姓名性别年龄班级兴趣爱好,背景是一张照片的html代码
时间: 2024-11-20 16:45:11 浏览: 27
当然可以。这是一个简单的HTML代码示例,展示了一个个人信息卡片,包括姓名、性别、年龄、班级和兴趣爱好,并附带一张照片。请注意,你需要将`<img>`标签里的`src`属性替换为实际的照片URL:
```html
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>个人资料</title>
<style>
.profile-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
border: 1px solid #ccc;
margin-bottom: 15px;
}
img {
width: 100px;
height: 100px;
border-radius: 50%;
object-fit: cover;
}
</style>
</head>
<body>
<div class="profile-card">
<img src="https://example.com/your-photo.jpg" alt="Your Profile Picture">
<div>
<h2>姓名: 张三</h2>
<p>性别: 男</p>
<p>年龄: 20岁</p>
<p>班级: 高一(1)班</p>
<p>兴趣爱好: 篮球、阅读和编程</p>
</div>
</div>
</body>
</html>
```
阅读全文
相关推荐















