1

How to create multi-color text border or underline in css3 as bellow :

enter image description here

Saad Bhutto
  • 594
  • 1
  • 8
  • 22

2 Answers2

4

Try this!

  

   

.box {
  text-align: center;
  position: relative;
  line-height: 100px;
  background: #fff;
  width: 300px;
  background: linear-gradient(to right, red 75%, blue 0) bottom/100% 4px no-repeat;
}
   <div class="box">Latest articles</div>
Elroy Fernandes
  • 303
  • 1
  • 3
  • 13
1
.wrapper {
    border-bottom: 3px solid red;
    position: relative;
}

.wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    width: 30px;
    background-color: blue;
}