如何在纯CSS导航栏上获得三角形悬停效果? [英] How do you get a triangle hover effect on a pure css navbar?
本文介绍了如何在纯CSS导航栏上获得三角形悬停效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在用户悬停在不同标签上时指向的文本下方有一个小三角形。这是一个我正在使用的代码。
I would like to have a little triangle underneath the the text that points up when the user hovers over the different tabs. Here is a bit of code I'm working with.
推荐答案
我认为这可能是你要找的:
I think this is probably what you're looking for:
也,请使用语义标记:
- 如果您使用HTML5包含
< nav&
标签。 - 您的链接(如果确实是链接)应为
< a>
元素。 - 对于像你这样的链接列表,建议使用列表(
< ul>
& code>< li> )。
- If your using HTML5 wrap your navigation in
<nav>
tags. - Your links (if they really are going to be links) should be
<a>
elements. - For a list of links like you have it is advised to use a list (
<ul>
&<li>
).
这篇关于如何在纯CSS导航栏上获得三角形悬停效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文