如何在中间垂直显示一个href,下划线与图片相同?

How to display an href vertically in the middle with the same underlining as the picture?

我想在中间和相同的对齐方式中垂直显示与此图片相似的 href(主页、关于、投资组合...)。

HTML代码:

<body bgcolor="#E6E6FA" leftmargin=150px topmargin=20px link="blue" vlink="purple" hlink="darkpink"> 
 <a href="SiteMap.html" > Home </a> &nbsp; 
 <a href="About.html" > About </a> &nbsp; 
 <a href="Portfolio.html" >Portfolio</a> &nbsp; 
 <a href="Services.html" >Services </a> &nbsp; 
 <a href="info.html" >Contact </a> <br> <br> <br>

你可以试试这个:

我不确定你想要 href static 还是 hover:

如果 href 默认:

li a {
border-bottom: 2px dashed #000;
}

如果 href 悬停:

li a:hover {
border-bottom: 2px dashed #000;
}

您可以使用虚线或虚线边框来寻找您的网站。