Demo ảnh.
Hiệu ứng chữ tự đổi màu nhé
Hiệu ứng chữ tự đổi màu nhé
Mã:
<style>
@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
html,body{
display: grid;
height: 100%;
place-items: center;
/* background: #000; */
}
.text{
font-size: 150px;
font-weight: 800;
outline: none;
text-transform: uppercase;
background: linear-gradient(135deg, #5335cf 0%, #de005e 25%, #f66e48 50%, #de005e 75%, #5335cf 100%);
background-size: 400%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: animate 10s linear infinite;
}
@keyframes animate {
to{
background-position: 400%;
}
}
</style>
<div spellcheck="false" class="text" contenteditable="true">
Google</div>