/* CSS Loading Animation Example */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loader {
border: 16px solid #f3f3f3; /* Light grey border */
border-top: 16px solid #3498db; /* Blue border on top */
border-radius: 50%; /* Makes it a circle */
width: 120px;
height: 120px;
animation: spin 2s linear infinite; /* Apply the spin animation */
}
/* Explanation:
- The @keyframes rule defines the animation sequence.
- The .loader class styles a circular loader with a spinning animation.
- The animation property applies the spin keyframes to the loader element, making it rotate infinitely.
*/
上一篇:css超出一行显示省略号
下一篇:css3新增属性
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站