gpt4 book ai didi

html - CSS 问题 - 是什么导致了这条垂直线?

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

只是在努力理解导致我的页面上出现一条小垂直线的代码在哪里:http://www.upreach.org.uk/undergraduates/benefits.php

该行似乎将主导航链接到子导航分支,此处带注释的屏幕截图:http://upreach.org.uk/old/css-vertical-line.png

我想找出答案,因为我想在另一个页面上实现同一行,但无法让它工作:http://www.upreach.org.uk/undergraduates/is-upReach-for-me.php

非常感谢您提供的任何帮助...

最佳答案

它是绘制那条线的以下元素:

<span class="anchor">&nbsp;</span>

用户看到的页面位于以下链接的末尾:

<a href="benefits.php" class="issue-link">
<span>What We</span>
Offer
<span class="anchor">&nbsp;</span> <!-- I am here! -->
</a>

元素样式:

#navigation ul li a .anchor {
position: absolute;
bottom: -9px;
left: 50%;
margin-left: -2px;
width: 4px;
height: 9px;
background: #333333;
display: block;
font-size: 0;
line-height: 0;
text-indent: -4000px;
}

关于html - CSS 问题 - 是什么导致了这条垂直线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18913703/

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