答案 0 :(得分:3)
试试看!
.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>
答案 1 :(得分: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;
}