如何应用悬停效果(增加字体尺寸)而不会影响整体内联文本



如何应用悬停效果(增加字体大小)而不影响整体内联文本?我是CSS的新手。您的帮助将很感激!

线高不起作用

请尝试以下:)

.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 -->

相关内容

  • 没有找到相关文章

最新更新