Files
ClassContent/历届学生/zheng-yuqing/项目练习/学生项目/XY媒体查询练习/课上练习.html
2024-09-27 02:06:13 +08:00

93 lines
2.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>
input {
width: 250px;
transition: all 2s cubic-bezier(0.7, -0.25, 0.84, 1.58);
}
input:hover {
width: 400px;
}
@keyframes an {
from {
width: 200px;
height: 200px;
background: red;
}
to {
width: 300px;
height: 300px;
background: blue;
}
}
/* .box {
width: 200px;
height: 200px;
animation: an 3s ease ;
} */
.box1 {
width: 100px;
height: 75px;
background: red;
border: 1px solid black;
transform: translateY(200px);
/* {x,y轴平移} */
}
.box2 {
width: 100px;
height: 75px;
background: red;
border: 1px solid black;
transform: rotateX(10deg);
/* {正数顺时针旋转,单位deg} */
}
.box3 {
width: 100px;
height: 75px;
background: red;
border: 1px solid black;
transform: scale(3, 1);
/* {让元素放大缩小x,y} */
}
.box4 {
width: 100px;
height: 100px;
background: red;
border: 1px solid black;
transform: skew(100deg,0);
}
/* {斜切x,y} */
/* matrix()6个参数,包括旋转,缩放,移动(平移)和斜切 */
/* rotate: ();沿中心轴旋转 rotateX: ();沿X轴旋转 rotateY:():沿Y轴旋转 */
</style>
</head>
<body>
<input type="text" placeholder="输入密码">
<div class="box"></div>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
<div class="box4"></div>
</body>
</html>