我不知道如何解決這個問題:在'a'元素懸停時,div放大,另一個'a'移動。修復懸停展開元素
感謝您的幫助
https://jsfiddle.net/0r2v2qyp/
這裏的html:
<a id="btn_agency" class="btn_presentation">Agenzia</a>
<a id="btn_student" class="btn_presentation">Studente</a>
<a id="btn_prof" class="btn_presentation">Docente</a>
<a id="btn_admin" class="btn_presentation">Segreteria</a>
和CSS:
.btn_presentation {
float: left;
margin: 10px;
color: royalblue;
font-size: 20px;
position: relative;
letter-spacing: 0;
text-transform: uppercase;
transition: all .2s ease-out;
}
.btn_presentation:after {
content: '';
position: relative;
display: block;
margin: 0 auto;
width: 0;
height: 0;
background: red;
transition: all .2s ease-out;
}
.btn_presentation:hover {
letter-spacing: 5px;
transition: all .3s ease-in;
}
.btn_presentation:hover:after {
width: 100%;
height: 2px;
transition: all .2s ease-in-out;
}
應該怎樣,而不是發生? – LGSon
他希望文字在懸停時增加,而其他文字不會被推開。 – Omnitored
正是,受監控 – Toma