<h2 class="title">這是一個標題</h2>
.title {
position: relative;
padding-bottom: 10px;
}
.title::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 3px;
background: linear-gradient(to right, #ff0000, #0000ff); /* 漸變雙色效果 */
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.