css下划线仅带有箭头居中的文字

问题描述 投票:0回答:2

格式化问题...我无法使用jsfiddle链接执行它要求我执行的操作。

css text underline
2个回答
0
投票

h2 { line-height: 17px; padding-bottom: 15px; text-transform: uppercase; border-bottom: 2px solid #00a7a8; position: relative; display: inline-block; } h2:before { content: '\25bc'; position: absolute; top: 100%; left: 5em; color: #00a7a8; } /* You can get quite a bit of control by adjusting the line-height of the pseudo-element */
<h2>The Header Is Here</h2>

0
投票

h2 { line-height: 17px; padding-bottom: 15px; text-transform: uppercase; border-bottom: 2px solid #00a7a8; position: relative; display:inline-block; } h2:before { content: '\25bc'; position: absolute; top: 100%; left: 50%; margin-left:-12px; color: #00a7a8; }
<h2>The Header Is Here</h2>
© www.soinside.com 2019 - 2024. All rights reserved.