Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
*[data-title]{
$bg: rgba(#11171c, .8);
$arrowIndex: 19px;
position: relative;
&:after,
&:before{
opacity: 0;
@include transition(
bottom .2s $swift .6s,
opacity .2s $swift .6s
);
}
&:hover{
&:after,
&:before{
opacity: 1;
@include transition(
bottom .2s $swift .3s,
opacity .2s $swift .3s
);
}
&:after{
bottom: -30px;
}
&:before{
bottom: -30px + $arrowIndex;
}
}
&:after {
@include font(content);
font-weight: 300;
bottom: -20px;
content: attr(data-title);
color: #fff;
background: $bg;
border-radius: 2px;
padding: 3px 8px;
position: absolute;
left: -15px;
font-size: 9px;
height: 13px;
white-space: nowrap;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, .6);
pointer-events: none;
min-width: 30px;
}
&:before{
bottom: -20px + $arrowIndex;
content: '';
width: 0;
height: 0;
border: transparent 5px solid;
border-bottom: $bg 5px solid;
left: 5px;
position: absolute;
pointer-events: none;
}
}
Не работает в IE до 9 версии включительно (кто б сомневался)Если не сделать, чтобы работало, оно и не будет работать (кто бы сомневался). В IE есть фильтр gradient и возможность задавать цвета в формате #AARRGGBB.
pointer-events: none;
Затухание текста средствами CSS