transform: skewX(30deg);
skewX正值,拽右下角,往右拉动,形成30度角(负值则相反)
transform: skewY(30deg);
skewY正值往下拉动,形成30度角(负值则相反)
transform: skew(30deg,30deg);
skew(x,y)正值 往下并往右拉动形成30度角(负值则相反)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div{
width: 200px;
height: 200px;
border: 1px solid black;
line-height: 200px;
text-align: center;
background: red;
font-size: 30px;
margin: 0 auto;
transform: skew(30deg,30deg);
/* skewX正值,拽右下角,往右拉动,形成30度角(负值则相反)
skewY往下拉动
skew(x,y)正值 往下并往右拉动形成30度角(负值则相反)
*/
}
</style>
</head>
<body>
<div>你好</div>
</body>
</html>