CSS给文本加下划线效果
.news_xiahuaxian:after{ content: ''; position: absolute; bottom: 0; left:150px; width: 20%; /* 下划线长度超过文字的百分比 */ height: 1px; background: var(--cpcolor); transform: scaleX(0.9); /* 下划线长度调整,1 代表正常长度,0.5 代表长度为原来的一半 */ transform-origin:left; text-decoration: underline; }
Statement: If the content on this site infringes upon the legitimate rights and interests of the original author, please contact this site to delete it.