主頁
CSS
CSS 2D 變換
Tryit:skewX() 方法
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <head> <style> div { width: 300px; height: 100px; background-color: yellow; border: 1px solid black; } div#myDiv { transform: skewX(20deg); } </style> </head> <body> <h1>The skewX() Method</h1> <p>The skewX() method skews an element along the X-axis by the given angle.</p> <div> This a normal div element. </div> <div id="myDiv"> This div element is skewed 20 degrees along the X-axis. </div> </body> </html>