<h2 class="title">這是一個標題</h2>
.title {
position: relative;
padding-bottom: 10px;
text-align: center;
}
.title::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 3px;
border-bottom: 2px dashed #000; /* 虛線樣式的底線 */
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.