Để thực hiện animation trên thuộc tính line-height với CSS, bạn có thể chạy đoạn mã sau:
Ví dụ
<!DOCTYPE html> <html> <head> <style> p { animation: mymove 3s infinite; line-height: 20px; } @keyframes mymove { 70% { line-height: 50px; } } </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> </body> </html>