How do you create an arrow for navigation assist like this?

How do you create the arrow that appears when you roll out the Reviews on this site?

http://mac.appstorm.net/category/reviews/

I want to create this via css but don't know how to do it. And what is the correct "term" for this?

Thank!

+4
source share
2 answers

You can see an example of Simple Stock Search if you sign up and hover over one of the menu options.

CSS for this arrow:

.reviews:after
{
    content: "";
    z-index: 9999;
    position: absolute;
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-top: 10px solid red;
    border-right: 10px solid transparent;
    border-left: 10px solid transparent;
}

Visit JSFiddle for a demo.

+3
source

from cssarrowplease.com

demonstration

HTML

<span class="arrow_box">test</span>

CSS

.arrow_box:hover {
    position: relative;
    background: #88b7d5;
    border: 4px solid #c2e1f5;
    width: 100px;
    display:inline-block;
    height: 25px;
}
.arrow_box:hover:after, .arrow_box:hover:before {
    top: 100%;
    left: 50%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.arrow_box:hover:after {
    border-color: rgba(136, 183, 213, 0);
    border-top-color: #88b7d5;
    border-width: 5px;
    margin-left: -5px;
}
.arrow_box:hover:before {
    border-color: rgba(194, 225, 245, 0);
    border-top-color: #c2e1f5;
    border-width: 11px;
    margin-left: -11px;
}
+2

Source: https://habr.com/ru/post/1532196/


All Articles