麻烦老师查看作业,谢谢。
来源:2-18 编程练习
DanielDu87
2022-02-01 23:26:29
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>2-9</title> <style> div { font-family: Arial, serif; font-size: 72px; font-weight: bold; position: fixed; right: 0; left: 0; width: 30px; height: 30px; margin: auto; transform: rotate(90deg); /*此处写代码*/ bottom: 60px; animation: r 0.5s linear 0.5s infinite backwards; } @keyframes r { from { bottom: 60px; } to { bottom: 20px; } } </style> </head> <body> <div>></div> </body> </html>
问一下老师,在可以frame里有from属性的botton属性值,那么在div里还需要定义吗
1回答
好帮手慕久久
2022-02-05
同学你好,代码正确,很棒!建议在div中设置上bottom,这样可以避免发生“动画不生效”这类未知的错误。
祝学习愉快!
相似问题