Простой ярлык на CSS3

HTML:

<span class="avail_tag">InsertHTML</span>

CSS:

.avail_tag {
    background: #588fe5;
    display: inline-block;
    color: #fff;
    position: relative;
    padding: 10px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    margin: 0 30px 0 0;
    text-decoration: none;
    opacity: 1;
    cursor: pointer;
}

.avail_tag:hover {
    opacity: 0.8;
}

.avail_tag:after {
    display: inline-block;
    border: 19px solid;
    border-color: transparent transparent transparent #588fe5;
    height: 0;
    width: 0;
    position: absolute;
    right: -38px;
    top: 0;
    content: "";
    display: inline-block;
}

На выходе получаем:

image

Posted in Записки on сен 19, 2017