HTML CSS examples for CSS Animatable Property:padding-right
In the following code the padding-right property of the following paragraph element is animating from its initial value "10px" to "100px", and back to the initial value "10px" again up to infinite times.
-webkit- prefix is for Chrome, Safari, Opera.
-moz- prefix is for Firefox.
<!DOCTYPE html> <html lang="en"> <head> <title>Example of CSS padding-right Property Animation</title> <style type="text/css"> .animated {<!-- w w w. j a v a 2 s.com--> padding: 10px; background: #ecb3c6; border: 1px solid #d24875; -webkit-animation: test 4s infinite; animation: test 4s infinite; } @-webkit-keyframes test { 50% {padding-right: 100px;} } @keyframes test { 50% {padding-right: 100px;} } </style> </head> <body> <p> </p> <p class="animated">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui. Mauris magna metus, dapibus nec turpis vel, semper malesuada ante. Vestibulum id metus ac nisl bibendum scelerisque non non purus. Suspendisse varius nibh non aliquet sagittis. In tincidunt orci sit amet elementum vestibulum. Vivamus fermentum in arcu in aliquam. Quisque aliquam porta odio in fringilla. Vivamus nisl leo, blandit at bibendum eu, tristique eget risus. Integer aliquet quam ut elit suscipit, id interdum neque porttitor. Integer faucibus ligula.</p> </body> </html>