如何在 css3 中创建多色文本边框
How to create multi-color text border in css3
如何在 css3 中创建多色文本边框或下划线,如下所示:
试试这个!
.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>
.wrapper {
border-bottom: 3px solid red;
position: relative;
}
.wrapper::after {
content: '';
position: absolute;
bottom: 0;
right: 0;
height: 3px;
width: 30px;
background-color: blue;
}
如何在 css3 中创建多色文本边框或下划线,如下所示:
试试这个!
.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>
.wrapper {
border-bottom: 3px solid red;
position: relative;
}
.wrapper::after {
content: '';
position: absolute;
bottom: 0;
right: 0;
height: 3px;
width: 30px;
background-color: blue;
}