如何在不影响整体内联文字的情况下应用悬停效果(增加字体大小)?我对css很新。感谢您的帮助!
行高不起作用
答案 0 :(得分:0)
请试试这个:)
.text{
font-size:20px; /* Font size you need in start*/
color:#333; /* font color #333 is hexadecimal code of black shade */
font-family:arial; /* font family to style the text */
font-weight:bold; /* To bold the text */
}
.text:hover{
transform:scale(1.5); /* The deafult value is 1 if you change it to any value less than one it will be smaal and vise versa large */}
/* YOU CAN ADD ANIMATION TOO FOR SMOOTH RESIZE */
.smooth{transition:all 0.3s;}
<center> <!-- The center tag is used to align the text in center -->
<p class="text"> PIXALVOOP - TEXT RESIZE</p>
<p class="text smooth"> PIXALVOOP - SMOOTH </p>
<center> <!-- The center tag is used to align the text in center -->