gpt4 book ai didi

html - 如何仅为 anchor 标记中的选定文本提供边框

转载 作者:太空宇宙 更新时间:2023-11-03 19:30:40 25 4
gpt4 key购买 nike

我有以下代码,我无权更改 html。如何给 border-bottom 或文本装饰:下划线只给 thefrontbottoms.com。

<div class="headera">
<a target="_blank" href="http://thefrontbottoms.com">Back To TheFrontBottoms.com</a></div>

实际结果:border-bottom 到 "Back To FrontBottoms.com"

预期结果:border-bottom 到“返回 FrontBottoms.com

最佳答案

由于您无法访问 HTML,这可能是您能做的最好的事情

a{
text-decoration: none;
}

a:before {
content: '';
position: absolute;
border-bottom: 1px solid rgb(0, 0, 238);
width: 145px;
top: 24px;
left: 68px;
}
<div class="headera">
<a target="_blank" href="http://thefrontbottoms.com">Back To TheFrontBottoms.com</a></div>

关于html - 如何仅为 anchor 标记中的选定文本提供边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31469745/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com