原码笔记

原码笔记

多步骤进度条的实现原理及代码

小诸哥 0

今天在工作的时候写了一个多步骤进度条的代码,在此跟大家分享一下!

效果图:

代码展示:

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.      <meta charset="UTF-8">
  5.      <title>step</title>
  6. </head>
  7. <style>
  8.      ul,li{list-style:none;}
  9.      .flow_steps{height:55px;width:1000px;margin:100px auto;}
  10.      .flow_steps .steps{padding-left:0;}
  11.      .flow_steps ul li { float:left; height:55px; padding:0 70px 0 50px; line-height:55px; text-align:center; background:url(http://7xnlea.com2.z0.glb.qiniucdn.com/stepbg.png) no-repeat 100% 0 #E4E4E4;font-family: "microsoft yahei";color:#6C6C6C;}
  12.      .flow_steps ul li.done { background-position:100% 0px; background-color:#E1E1E1;}
  13.      .flow_steps ul li.current_prev { background-position:100% -55px; background-color:#E1E1E1;}
  14.      .flow_steps ul li.current { color:#fff; background-color:#DD4D3C;}
  15.      .flow_steps ul li.last { background-image:none;}
  16.      .flow_steps ul li.first { border-radius:10px 0 0 10px; }
  17.      .flow_steps ul li.last { border-radius:0 10px 10px 0; }
  18. </style>
  19. <body>
  20. <div class="flow_steps clearfix">
  21.      <ul class="clearfix steps">
  22.          <li class=" done first current_prev ">
  23.              第一步
  24.          </li>
  25.          &lt;li class=" current">
  26.              第二步
  27.          </li>
  28.          <li class=" ">
  29.              第三步
  30.          </li>
  31.          <li class=" last">
  32.              第四步
  33.          </li>
  34.      </ul>
  35. </div>
  36. </body>
  37. </html>

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持我们!

标签: 实现 原理 代码