transform : translate(),scale(),rotate(),skew()
/*
transform : translate(),scale(),rotate(),skew()
*/
INDEX.HTML:
<!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>CSS Tutorial</title>
<link rel="stylesheet" href="styles.css">
</head>
<body >
<div class="one">
</div>
<div class="two">
</div>
<div class="three">
Hello. This is a DIV element.
</div>
</body>
</html>
CSS:
/*
transform : translate(),scale(),rotate(),skew()
*/
div {
width: 150px;
height: 150px;
background: red;
display: inline-block;
}
.one {
background: green;
transform: rotate(30deg);
}
.two {
background: blue;
transform: translate(0px,50px);
}
.three {
background: red;
color: white;
transform: skew(-20deg,-30deg);
}
评论
发表评论