<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>步骤卡片设计HTML示例</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Helvetica Neue', Arial, sans-serif;
padding: 3rem;
background: #f8f9fa;
min-height: 100vh;
display: flex;
align-items: center;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.header {
text-align: center;
margin-bottom: 50px;
}
.header h1 {
font-size: 2.5rem;
color: #2c3e50;
margin-bottom: 15px;
font-weight: 600;
}
.header p {
color: #7f8c8d;
font-size: 1.1rem;
}
.steps-container {
display: flex;
justify-content: space-between;
gap: 25px;
position: relative;
}
.step-card {
flex: 1;
padding: 30px 20px;
min-height: 320px;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
background: white;
border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
overflow: hidden;
}
.step-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.step-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 5px;
}
.step-card:nth-child(1)::before {
background: #ffd700;
}
.step-card:nth-child(2)::before {
background: #ff8c00;
}
.step-card:nth-child(3)::before {
background: #e91e63;
}
.step-card:nth-child(4)::before {
background: #9c27b0;
}
.step-card:nth-child(5)::before {
background: #00bcd4;
}
.circle {
width: 90px;
height: 90px;
background: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
font-weight: 600;
margin: 20px 0;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 1;
}
.step-card:nth-child(1) .circle {
color: #ffd700;
border: 2px solid #ffd700;
}
.step-card:nth-child(2) .circle {
color: #ff8c00;
border: 2px solid #ff8c00;
}
.step-card:nth-child(3) .circle {
color: #e91e63;
border: 2px solid #e91e63;
}
.step-card:nth-child(4) .circle {
color: #9c27b0;
border: 2px solid #9c27b0;
}
.step-card:nth-child(5) .circle {
color: #00bcd4;
border: 2px solid #00bcd4;
}
.title {
color: #2c3e50;
font-size: 20px;
font-weight: 600;
margin-bottom: 20px;
text-align: center;
}
.content {
color: #7f8c8d;
text-align: center;
font-size: 15px;
line-height: 1.6;
padding: 0 15px;
}
.step-card:hover .circle {
transform: scale(1.1);
transition: transform 0.3s ease;
}
@media (max-width: 1024px) {
.steps-container {
gap: 15px;
}
.circle {
width: 70px;
height: 70px;
font-size: 24px;
}
.title {
font-size: 18px;
}
.content {
font-size: 14px;
}
}
@media (max-width: 768px) {
body {
padding: 1rem;
}
.steps-container {
flex-direction: column;
gap: 30px;
}
.step-card {
width: 100%;
min-height: auto;
padding: 25px;
}
.header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>步骤卡片设计HTML示例</h1>
<p>清晰的步骤指引,助您轻松达成目标</p>
</div>
<div class="steps-container">
<div class="step-card">
<div class="circle">01</div>
<div class="title">规划阶段</div>
<div class="content">制定详细的项目计划,明确目标和时间节点,为后续执行打下坚实基础。</div>
</div>
<div class="step-card">
<div class="circle">02</div>
<div class="title">准备阶段</div>
<div class="content">收集必要的资源和信息,组建团队,确保项目顺利开展的各项准备工作。</div>
</div>
<div class="step-card">
<div class="circle">03</div>
<div class="title">执行阶段</div>
<div class="content">按照计划开展具体工作,及时处理问题,确保项目按期推进。</div>
</div>
<div class="step-card">
<div class="circle">04</div>
<div class="title">监控阶段</div>
<div class="content">对项目进展进行实时监控,及时调整策略,确保项目质量。</div>
</div>
<div class="step-card">
<div class="circle">05</div>
<div class="title">第五步骤</div>
<div class="content">这是第五个步骤的详细说明内容。在这里添加相关的描述文字。</div>
</div>
</div>
</div>
</body>
</html>
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ... </head>
<body>
</body>
CSS
格式化
JS
格式化