鼠标悬停文本颜色变化

将鼠标悬停在这里,文字颜色将会平滑地从黑色变成红色。

<style>
.color-text {
font-size:30px;
color: black;
font-weight: bold;
transition: color 0.5s ease-in-out, font-weight 0.5s ease-in-out;
}

.color-text:hover {
color: red;
font-weight: bold;
}
</style>