|
|

楼主 |
发表于 2025-7-12 12:31
|
显示全部楼层
参考代码
- <style>
- #ball {
- --size: 200px;
- margin: 200px calc(50% - var(--size) / 2);
- position: relative;
- width: var(--size);
- height: var(--size);
- background: url('https://638183.freep.cn/638183/t22/rabbit.gif') no-repeat center/cover;
- border-radius: 50%;
- filter: drop-shadow(10px 10px 20px #333);
- }
- #ball::before, #ball::after {
- position: absolute;
- content: '';
- width: 100%;
- height: 100%;
- background: linear-gradient(45deg, yellow, gold);
- border-radius: 50%;
- }
- #ball::before {
- transform-origin: 100% 50%;
- transition: 0.5s;
- clip-path: inset(0 0 50% 0);
- z-index: 1;
- }
- #ball::after {
- clip-path: inset(50% 0 0 0);
- }
- #ball:hover::before {
- transform: rotate(90deg);
- }
- </style>
- <div id="ball"></div>
复制代码
|
评分
-
| 参与人数 1 | 威望 +50 |
金钱 +100 |
经验 +50 |
收起
理由
|
红影
| + 50 |
+ 100 |
+ 50 |
赞一个! |
查看全部评分
|