Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
:root { --alabaster: #FAFAFA; --frangipani: #FFDCB5; --frostee: #EAF7EB; --lemon-chiffon: #F9EEAB; --sundown: #FFB7BC; --white: #FFF; } *, ::after, ::before { box-sizing: border-box; font-family: sans-serif; margin: 0; padding: 0; } body { background-color: 1f1f1f; min-height: 100vh; width: 100%; } .card-container { display: grid; grid-gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(23rem, 1fr)); margin: 0 auto; max-width: 100%; padding: 2rem; width: 55rem; } .card { align-items: center; border-radius: 0.25rem; box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.25); display: flex; height: 23rem; justify-content: center; position: relative; width: 100%; } .ball { background-color: var(--white); border-radius: 50%; height: 3rem; position: absolute; width: 3rem; } /* Square */ .square-card { background-color: var(--frostee); } .square-card::before { animation: shadow 1.6s ease-in-out infinite both; background-color: rgba(0, 0, 0, 0.2); border-radius: 50%; bottom: 2rem; box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.2); content: ''; height: 0.1rem; left: 25%; position: absolute; right: 25%; } .down { animation: down 1.6s ease-in infinite both; bottom: 2rem; position: absolute; } .down .up { animation: up 1.6s ease-in-out infinite both; } .down .up .squeeze { animation: squeeze 1.6s cubic-bezier(0.72, 0.03, 0.28, 0.97) infinite both; transform-origin: 50% 100%; } .down .up .squeeze .rotate-in { animation: rotate-in 1.6s ease-out infinite both; } .down .up .squeeze .rotate-in .rotate-out { animation: rotate-out 1.6s ease-in infinite both; } .square { background-color: var(--white); height: 5rem; width: 5rem; } @keyframes down { 0% { transform: translateY(-10rem); } 20%, 100% { transform: translateY(0); } } @keyframes up { 0%, 75% { transform: translateY(0); } 100% { transform: translateY(-10rem); } } @keyframes squeeze { 0%, 4% { transform: scale(1); } 45% { transform: scale(1.8, 0.4); } 100% { transform: scale(1); } } @keyframes rotate-in { 0% { transform: rotate(-135deg); } 20%, 100% { transform: rotate(0deg); } } @keyframes rotate-out { 0%, 80% { transform: rotate(0); } 100% { transform: rotate(135deg); } } @keyframes shadow { 0%, 100% { transform: scaleX(0.3); } 45%, 50% { transform: scaleX(0.8); } } /* End square */ /* Ball bouncing */ .ball-bouncing { background-color: var(--lemon-chiffon); } .ball-bouncing::before { animation: shadowBouncing 1.2s ease-in infinite; background-color: rgba(0, 0, 0, 0.2); border-radius: 1rem; bottom: 2rem; content: ''; height: 0.15rem; position: absolute; width: 2rem; } .ball-bouncing .ball { animation: ballBouncing 1.2s ease-in infinite; bottom: 2.1rem; transform-origin: bottom; } @keyframes ballBouncing { 0%, 100% { transform: scale(1.5, 0.5); } 20% { transform: scaleY(1.2); } 40%, 80% { transform: translateY(-14rem); } 70% { transform: translateY(-15rem); } 90% { transform: translateY(0); } } @keyframes shadowBouncing { 0%, 100% { transform: scale(2, 0.8); } 20% { transform: scale(1.2, 0.8); } 40%, 80% { transform: scale(0.5, 0.2); } 70% { transform: scale(0.5, 0.15); } 90% { transform: scale(1.5, 0.6); } } /* End ball bouncing */ /* Ball movement */ .ball-movement { background-color: var(--frangipani); overflow: hidden; } .ball-movement::before { background-color: rgba(0, 0, 0, 0.15); border-radius: 1rem; bottom: 2rem; content: ''; height: 0.15rem; left: 2rem; position: absolute; right: 2rem; } .ball-movement .ball { animation: ballMovement 1.6s cubic-bezier(0, 0.98, 1, 0.99) infinite; bottom: 2.1rem; transform: translate(14rem, -15rem) scale(1.2, 0.5); transform-origin: bottom; } @keyframes ballMovement { 0% { transform: translate(14rem, -15rem); } 15% { transform: translate(7rem, 0rem) scale(1.2, 0.5); } 30% { transform: translate(2rem, -10rem) scale(1, 1); } 45% { transform: translate(-2rem, 0rem) scale(1.2, 0.8); } 60% { transform: translate(-5rem, -5.5rem) scale(1, 1); } 75% { transform: translate(-8rem, 0rem) scale(1.1, 0.9); } 100% { transform: translate(-14rem, -3rem) scale(1, 1); } } /* End ball movement */ /* Counter */ .counter { animation: counter 5s linear infinite alternate; background-color: var(--sundown); counter-reset: count 0; } .counter::before { color: var(--white); content: counter(count); font-size: 7rem; line-height: 1.1; text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3); } @keyframes counter { 0% { counter-increment: count 0; } 10% { counter-increment: count 1; } 20% { counter-increment: count 2; } 30% { counter-increment: count 3; } 40% { counter-increment: count 4; } 50% { counter-increment: count 5; } 60% { counter-increment: count 6; } 70% { counter-increment: count 7; } 80% { counter-increment: count 8; } 90% { counter-increment: count 9; } 100% { counter-increment: count 10; } } /* End counter */
JavaScript
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>CSS动画-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号