css 实现球里装水
2024-10-10 12:29:38
<template>
<div class="container">
<div class="wave"></div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss">
.container {
position: absolute;
width: 200px;
height: 200px;
padding: 5px;
border: 5px solid rgb(118, 218, 255);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
overflow: hidden;
}
.wave {
position: relative;
width: 200px;
height: 200px;
background-color: rgb(118, 218, 255);
border-radius: 50%;
&::before,
&::after{
content: "";
position: absolute;
width: 400px;
height: 400px;
top: 0;
left: 50%;
background-color: rgba(255, 255, 255, .4);
border-radius: 45%;
transform: translate(-50%, -70%) rotate(0);
animation: rotate 6s linear infinite;
z-index: 10;
}
&::after {
border-radius: 47%;
background-color: rgba(255, 255, 255, .9);
transform: translate(-50%, -70%) rotate(0);
animation: rotate 10s linear -5s infinite;
z-index: 20;
}
}
@keyframes rotate {
50% {
transform: translate(-50%, -73%) rotate(180deg);
} 100% {
transform: translate(-50%, -70%) rotate(360deg);
}
}
</style>
转自: https://csscoco.com/inspiration/#/./border/border-wave-percent.md
最新文章
- Leetcode 259. 3Sum Smaller
- Windows 终端服务器授权 激活
- Android微信登陆
- JBOSS EAP 6.0+ Standalone模式安装成Windows服务
- 【poj1041】 John&#39;s trip
- (转) C#如何使用异步编程
- Apache配置多个网站的方法
- POJ2263 Heavy Cargo
- spring中Bean的注入参数详解
- [转载]IOS项目打包除去NSLog和NSAssert处理之阿堂教程
- v4l2视频采集摄像头
- springboot 集成spring-session redis 实现分布式session
- PHP超全局变量$_SERVER
- Java将数据写入word文档(.doc)
- Java中Math.round()函数
- Docker Compose 原理
- Alienware R8外星人台式机安装双系统(WIN10+Ubuntu)的总结
- Spring常用注解总结(1)
- Codeforces Round #467 Div. 1
- phantomjs 解码url