要在CSS中實現對margin-bottom屬性的動畫效果,您可以嘗試執行以下程式碼
線上示範
<!DOCTYPE html> <html> <head> <style> p { animation: mymove 3s infinite; margin-bottom: 20px; } @keyframes mymove { 70% { margin-bottom: 60px; } } </style> </head> <body> <p>This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! This is demo text! </p> <p>This is demo text 2!</p> </body> </html>
以上是動畫 CSS margin-bottom 屬性的詳細內容。更多資訊請關注PHP中文網其他相關文章!