Page Widget How to - Create Progress breadcrum Arrow








Question

We would like to know how to create Progress breadcrum Arrow.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
* {<!--   ww  w.ja va  2s . c o m-->
  box-sizing: border-box;
}

#progress {
  padding: 0;
  list-style-type: none;
  font-family: arial;
  font-size: 12px;
  clear: both;
  line-height: 1em;
  margin: 0 -1px;
  text-align: center;
}

#progress li {
  float: left;
  padding: 10px 30px 10px 40px;
  background: #333;
  color: #fff;
  position: relative;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
  width: 32%;
  margin: 0 1px;
}

#progress li:before {
  content: '';
  border-left: 16px solid #fff;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  position: absolute;
  top: 0;
  left: 0;
}

#progress li:after {
  content: '';
  border-left: 16px solid #333;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 20;
}

#progress li.active {
  background: #555;
}

#progress li.active:after {
  border-left-color: #555;
}
</style>
</head>
<body>
  <ul id="progress">
    <li>Step 1</li>
    <li class="active">Step 2</li>
    <li>Step 3</li>
  </ul>
</body>
</html>

The code above is rendered as follows: