CSS | skewY() Function
The skewY() function is an inbuilt function which is used to transform an element in the vertical direction in a 2D plane.
Syntax:
skewY( a )
Parameters: This function accepts single parameter a which holds the angle representing the vertical axis.
Below examples illustrate the skewY() function in CSS:
Example 1:
html
<!DOCTYPE html> < html > < head > < title >CSS skewY() function</ title > < style > body { text-align:center; } h1 { color:green; } .skewY_image { transform: skewY(30deg); } </ style > </ head > < body > < h1 >GeeksforGeeks</ h1 > < h2 >CSS skewY() function</ h2 > < br >< br > < img class="skewY_image" src= alt="GeeksforGeeks logo"> </ body > </ html > |
Output:
Example 2:
html
<!DOCTYPE html> < html > < head > < title >CSS skewY() function</ title > < style > body { text-align:center; } h1 { color:green; } .GFG { font-size:35px; font-weight:bold; color:green; transform: skewY(-20deg); } </ style > </ head > < body > < h1 >GeeksforGeeks</ h1 > < h2 >CSS skewY() function</ h2 > < div class="GFG">Welcome to GeeksforGeeks</ div > </ body > </ html > |
Output:
Supported Browsers: The browsers supported by skewY() function are listed below:
- Google Chrome 1
- Edge 12
- Internet Explorer 9
- Firefox 3.5
- Safari 3.1
- Opera 10.5
Please Login to comment...