查看: 299|回复: 20

[活动] 【凡哥教程第二十九讲作业】小球排队跑(帖子子元素布局技巧之二))

[复制链接]
发表于 2024-9-1 21:32 | 显示全部楼层 |阅读模式

评分

6

查看全部评分

点评
回复

使用道具

 楼主| 发表于 2024-9-1 21:34 | 显示全部楼层
凡哥教程第二十九讲作业:
参照最后的示例,做个一父三子的小东东,父元素为圆形空心用以模拟轨道、子元素球体实心用以模拟星球。
要求:三个小星球中,每一个星球有一半在轨道内、另一半再轨道外,它们彼此间间隔一定距离,最终效果是三个小星球沿着轨道你追我赶地进行有序运动。
【提示】小球错开运动可在 animation 属性中使用简写形式的属性值加入延时执行动画的时间属性,整体语句结构为 animation: 动画名称 运动周期时长 运动延时 linear infinite,后两个属性分别表示匀速运动、永不停歇。运动周期时长和运动延时均需要 s 或 ms 单位,延时支持负数值,负数值表示提前运行
<style> .qsfg29{ margin: 230px 0 30px calc(50% - 151px);     width: 300px;     height: 300px;     border: 1px solid gray;     border-radius: 50%;     display: grid;     place-items: center;     position: relative; } .son1 {     position: absolute;     width: 50px;     height: 50px;     border-radius: 50%;     background: linear-gradient(45deg, olive, red);     animation: go 6s linear infinite;     animation-delay: -2s;     } .son2 {     position: absolute;     width: 50px;     height: 50px;     border-radius: 50%;     background: linear-gradient(45deg, olive, green);     animation: go 6s linear infinite;         animation-delay: -4s; } .son3 {     position: absolute;     width: 50px;     height: 50px;     border-radius: 50%;     background: linear-gradient(45deg, olive, yellow);     animation: go 6s linear infinite;     animation-delay: -6s; } @keyframes go {     from { transform: rotate(0) translateX(150px); }     to { transform: rotate(-360deg) translateX(150px); } } </style> <div class="qsfg29">     <div class="son1"></div>     <div class="son2"></div>     <div class="son3"></div> </div>

评分

1

查看全部评分

凡哥 2024-9-1 21:38
回复
标准答案
100√
回复

使用道具

 楼主| 发表于 2024-9-1 21:34 | 显示全部楼层
@凡哥 老师来瞧瞧,今天这个作业是不是这样理解的。
点评
回复

使用道具

发表于 2024-9-1 21:38 | 显示全部楼层
花简静 发表于 2024-9-1 21:34
@凡哥 老师来瞧瞧,今天这个作业是不是这样理解的。

完全正确
点评
回复

使用道具

 楼主| 发表于 2024-9-1 21:44 | 显示全部楼层

这个也太开心了。
实际上中间改过好几次,三球老盖住
认真看作业提示要求,最后出的这一版。
点评
回复

使用道具

发表于 2024-9-2 00:13 | 显示全部楼层
谢谢静版作业示范,祝开心
点评
回复

使用道具

发表于 2024-9-2 08:33 | 显示全部楼层
这个好玩儿,欣赏静静带来的精彩作
点评
回复

使用道具

发表于 2024-9-2 08:34 | 显示全部楼层
问好,静静,感谢你的精彩分享。
点评
回复

使用道具

发表于 2024-9-2 08:34 | 显示全部楼层
祝静静学习愉快,每天好心情!
点评
回复

使用道具

发表于 2024-9-2 08:34 | 显示全部楼层
期待静静更多家作分享,9月安好!
点评
回复

使用道具

您需要登录后才可以回帖 登录 | 中文注册

本版积分规则

手机版|千山论坛 ( 冀ICP备2024055714号 )

GMT+8, 2025-6-9 05:10

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表