With CSS transform property you can change shape, size and position of a HTML element.
You can transform your elements using 2D or 3D transformation.
- Syntax:
translate()
method moves the element from its current position, depending on the parameters given for the left (X-axis) and the top (Y-axis) position.<style> #idv { width:90px; height:90px; background:#b0b1fe; font-size:17px; } #idv:hover { transform: translate(20px, 15px); } </style> <h4>Example transform: translate()</h4> <div id='idv'>Hover over this square</div>
rotate()
method rotates the HTML element clockwise at a given degree. Negative values will rotate the element counter-clockwise.<style> #idv2 { width:90px; height:90px; background:#b0b1fe; font-size:17px; } #idv2:hover { transform: rotate(60deg); } </style> <h4>Example transform: rotate()</h4> <div id='idv2'>Hover over this square</div>
scale()
method increases or decreases the size of the HTML element (including its content), depending on the parameters given for the width (X-axis) and the height (Y-axis).<style> #idv3 { width:90px; height:90px; background:#b0b1fe; font-size:17px; margin:8px 8px 8px 75px; } #idv3:hover { transform: scale(2, 1.5); } </style> <h4>Example transform: scale()</h4> <div id='idv3'>Hover over this square</div>
skew()
method turns /distorts the HTML element in a given angle (including its content), depending on the parameters given for the horizontal (X-axis) and the vertical (Y-axis) lines.<style> #idv4 { width:160px; height:90px; background:#abcdfe; font-size:18px; margin:45px 8px 8px 70px; transform: skew(20deg, 25deg); } </style> <h4>Example transform: skew()</h4> <div id='idv4'>coursesweb.net</div>
transform
definition, separated by space.<style> #idv5 { width:90px; height:90px; background:#00da01; font-size:17px; margin:45px 8px 8px 75px; transform: translate(50px, 25px) rotate(-30deg) scale(2, 1.5) skew(15deg, 20deg); } </style> <h4>Example CSS transform property</h4> <div id='idv5'>Some content...</div>
<table><tr> <th>Title 1</th> <th>Title 2</th> </tr></table>
.some_class { line-height: 150%; }
document.getElementById("id_button").onclick = function(){ window.open("http://coursesweb.net/"); }
$ar_dir = scandir("dir_name"); var_export($ar_dir);