.tooltip {
display: block;
margin: 50px;
position: relative;
transition: 10s linear all;
width: 100px;
}
.tooltip:after,
.tooltip:before {
transition: 10s linear all
}
.tooltip:before {
z-index: 99;
top: 100%;
right: 50000px;
position: absolute;
margin-top: -12px
}
.tooltip:after {
background: #FCE0BA;
top: 100%;
right: 50000px;
position: absolute;
z-index: 98;
width: 100px
}
.tooltip:hover:before {
border: solid;
border-color: #FCE0BA transparent;
border-width: 0px 6px 12px 6px;
content: "";
right: 50%;
margin-top: -12px
}
.tooltip:hover:after {
background: #FCE0BA;
color: #559bd9;
content: attr(title);
right: 20%;
padding: 6px;
font-size: 18px;
line-height: 1;
max-height: 999999px
}
<span class="tooltip" title="Lorem ipsum!">Hover me</div>
我試圖創建一個合適的位置的轉變,
正如你所看到的,它有一個非常大的權值,那麼我需要的,
但由於某些原因,該過渡將無法運行動畫,
你知道什麼,我缺少什麼?
只有少數瀏覽器支持轉變爲僞元素,此外,您應該有序轉變的簡寫,它必須是 –