I am working on a navigation bar with a horizontal line with an arrow, and I want to put the border in a triangle as follows:

I want it to be like this:

Here is the list:
<ul>
<li><a href="#foo" id="foo">foo</a></li>
<li><a href="#bar" id="bar">bar</a></li>
<li><a href="#baz" id="baz">baz</a></li>
</ul>
And here is a demo
EDIT: here is another
source , so how can I do it differently? I mean the triangle pointer at the top?
source
share