点击查看html编辑器说明文档

漂亮的步骤条HTML设计样例edit icon

|
|
Fork(复制)
|
|
提交反馈
嵌入
设置
下载
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
            
            <!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: Arial, sans-serif;
      background-color: #f5f5f5;
      padding: 2rem;
    }
    
    .timeline-container {
      max-width: 1200px;
      margin: 0 auto;
    }
    
    .cards-container {
      display: flex;
      margin-bottom: 3rem;
    }
    
    .card {
      flex: 1;
      background: white;
      padding: 1.5rem;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      position: relative;
    }
    
    .card:not(:last-child) {
      margin-right: 1rem;
    }
    
    .card::after {
      content: '';
      position: absolute;
      bottom: -20px;
      left: 50%;
      transform: translateX(-50%);
      border-left: 20px solid transparent;
      border-right: 20px solid transparent;
      border-top: 20px solid white;
    }
    
    .number {
      font-size: 2.5rem;
      margin-bottom: 1rem;
    }
    
    .card:nth-child(1) .number { color: #ffd700; }
    .card:nth-child(2) .number { color: #ff8c00; }
    .card:nth-child(3) .number { color: #e91e63; }
    .card:nth-child(4) .number { color: #9c27b0; }
    .card:nth-child(5) .number { color: #00bcd4; }
    
    .title {
      font-size: 1rem;
      font-weight: bold;
      margin-bottom: 0.5rem;
    }
    
    .description {
      font-size: 0.9rem;
      color: #666;
    }
    
    .timeline {
      display: flex;
      align-items: center;
      position: relative;
    }
    
    .timeline::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      width: 100%;
      height: 4px;
      background: linear-gradient(90deg, #ffd700, #ff8c00, #e91e63, #9c27b0, #00bcd4);
      transform: translateY(-50%);
      z-index: 0;
    }
    
    .timeline-point {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 1;
    }
    
    .timeline-point:not(:last-child) {
      margin-right: 1rem;
    }
    
    .timeline-point .circle {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      font-size: 20px;
    }
    
    .timeline-point:nth-child(1) .circle { background: #ffd700; }
    .timeline-point:nth-child(2) .circle { background: #ff8c00; }
    .timeline-point:nth-child(3) .circle { background: #e91e63; }
    .timeline-point:nth-child(4) .circle { background: #9c27b0; }
    .timeline-point:nth-child(5) .circle { background: #00bcd4; }
    
    .timeline-point i {
      font-size: 1.5rem;
    }
  </style>
</head>
<body>
  <div class="timeline-container">
    <div class="cards-container">
      <div class="card">
        <div class="number">01</div>
        <div class="title">第一选项</div>
        <div class="description">这是第一个步骤的详细描述内容。</div>
      </div>
      <div class="card">
        <div class="number">02</div>
        <div class="title">第二选项</div>
        <div class="description">这是第二个步骤的详细描述内容。</div>
      </div>
      <div class="card">
        <div class="number">03</div>
        <div class="title">第三选项</div>
        <div class="description">这是第三个步骤的详细描述内容。</div>
      </div>
      <div class="card">
        <div class="number">04</div>
        <div class="title">第四选项</div>
        <div class="description">这是第四个步骤的详细描述内容。</div>
      </div>
      <div class="card">
        <div class="number">05</div>
        <div class="title">第五选项</div>
        <div class="description">这是第五个步骤的详细描述内容。</div>
      </div>
    </div>
    <div class="timeline">
      <div class="timeline-point">
        <div class="circle">🏠</div>
      </div>
      <div class="timeline-point">
        <div class="circle">💡</div>
      </div>
      <div class="timeline-point">
        <div class="circle">📈</div>
      </div>
      <div class="timeline-point">
        <div class="circle">✉️</div>
      </div>
      <div class="timeline-point">
        <div class="circle">⚙️</div>
      </div>
    </div>
  </div>
</body>
</html>

        
</body>
CSS
格式化
            
            
        
JS
格式化
            
            
        
预览
控制台