css3常用属性之 skew翻转角度

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
body
{
font-size:24px;
color:#60F;}
div
{
200px;
height:115px;
background-color:yellow;
border:1px solid black;
}
#aa
{
transform:skew(30deg,0deg);
margin:50px;}
#bb
{
transform:skew(0deg,30deg);
margin:50px;}
#cc
{
transform:skew(30deg,30deg);
margin:50px;}
</style>
</head>

<body>
<div>你好。这是一个 div 元素。</div>

<div id="aa">这是将横向扭转30度的div,内部文字会跟随扭转</div>

<div id="bb">这是将纵向扭转30度的div,内部文字会跟随扭转</div>

<div id="cc">这是将横向扭转30度、纵向扭转30度的div,内部文字会跟随扭转</div>
</body>
</html>

原文地址:https://www.cnblogs.com/bhmmlxieliming/p/6516586.html