当前位置:网站首页>2D Transform Module && Media Queries
2D Transform Module && Media Queries
2022-07-30 23:34:00 【qq_48639265】
2D转换模块
1. transform: rotate(45deg)
deg代表多少度
2. transform: translate (100px, 0px)
第一个参数:水平方向
第二个参数:垂直方向
3. transform: scale(1.5); transform: scale(0.5,0.5);
第一个参数:水平方向
第二个参数:垂直方向
Comprehensive transformation ligatures format
transform: rotate(45deg) translate(100px, 0px) scale(1.5, 1.5)
形变中心点
transform-origin:
第一个参数:水平方向
第二个参数:垂直方向
取值有三种形式
具体像素
transform-origin: 200px 0px;
百分比
transform-origin: 50% 50%;
transform-origin: 0% 0%;
特殊关键字
transform-origin: center center;
默认情况下所有的元素都是以自己的中心点作为参考来旋转的, 我们可以通过形变中心点属性来修改它的参考点
旋转轴向
transform: rotateZ(45deg); -------默认围绕z轴旋转
围绕z轴旋转
transform: rotateX(45deg);
围绕x轴旋转
transform: rotateY(45deg);
围绕y轴旋转
3DThe element view perspective
<!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: 310px; height: 438px; transition: transform 2s; margin: 50px auto; /* 设置3D视图 */ perspective: 500px; } div:hover img {
transform: rotateX(-45deg); } </style>
</head>
<body>
<div>
<img src="../../images/pk.png" alt="">
</div>
</body>
</html>
效果图:
媒体查询
According to the characteristics of equipment display(如视口宽度、屏幕比例、设备方向:横向或纵向)为其设定css样式,媒体查询由媒体类型和一个或多个检测媒体特性的条件表达式组成.
PC端 1024px
pad端 >768px < 1024px
移动端 <768px
** 使用方法**
<!-- link元素中的CSS媒体查询 -->
<link rel="stylesheet" media="(min-width: 800px)" href="example.css" />
<!-- 样式表中的CSS媒体查询 -->
<style> @media (max-width: 600px) {
.class {
display: none; } } </style>
多条语句
<style> @media screen and (max-width:999px) and (min-width:801px){
div{
font-size: 50px; } } </style>
媒体类型
all | 所有媒体(默认值) |
---|---|
screen | 彩色屏幕 |
打印预览 |
媒体属性
width | 可加max min前缀 |
---|---|
height | 可加max min前缀 |
device-width | 可加max min前缀 |
orientation | portrait竖屏/landscape横屏 |
边栏推荐
- Shell脚本 if语句
- Gxlcms audio novel system/novel listening system source code
- Alibaba Cloud video on demand + project combat
- MPI简谈
- Debezium error series 20: task failed to create new topic. Ensure that the task is authorized to create topics
- 边缘计算与小程序也能结合!智能家居是否能借势上台阶
- Apache Doris系列之:安装与部署详细步骤
- C# VSCode & Rider引用命名空间快捷键
- 科技的成就(三十一)
- 2021GDCPC Guangdong University Student Programming Competition H.History
猜你喜欢
Reverse linked list - in-place inversion method
A detailed explanation: SRv6 Policy model, calculation and drainage
JS中? ?和??=和?.和 ||的区别
EasyExcel comprehensive course combat
Chevrolet Trailblazer, the first choice for safety and warmth for your family travel
从编译的角度来学作用域!
HCIP第十五天笔记
Go语学习笔记 - gorm使用 - 事务操作 Web框架Gin(十一)
Excel基础学习笔记
Reverse linked list - head insertion inversion method
随机推荐
【VisDrone数据集】YOLOV4训练VisDrone数据集步骤与结果
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)
Flex布局使用
The problem of sticky packets in tcp protocol transmission
2022 Nioke Summer Multi-School Training Camp 1 J Serval and Essay
"Wei cup" school more than 2022 cattle summer camp 4 L.B lack Hole, computational geometry
align-content、justify-content、align-items三个属性的作用和效果
递增三元组
PyTorch模型导出到ONNX文件示例(LeNet-5)
写了多年业务代码,我发现了这11个门道,只有内行才知道
vscode上利用screen命令跑代码
IJCAI2022 Tutorial | Spoken Language Comprehension: Recent Advances and New Fields
A detailed explanation: SRv6 Policy model, calculation and drainage
机器学习1一回归模型(二)
uni-ui installation
Calico 网络通信原理揭秘
可视化工具Netron介绍
Gxlcms audio novel system/novel listening system source code
[SAM模板题] P3975 [TJOI2015] 弦论
游戏商城表建立