Mi informacion de contacto
Correo[email protected]
2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
La transformación puede entenderse simplemente como deformación.
Móvil: traducir
rotar: rotar
Zoom: escala
- /* 移动盒子的位置: 定位 盒子的外边距 2d转换移动 */
-
-
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- /* x就是x轴上移动位置 y 就是y轴上移动位置 中间用逗号分隔*/
-
- /* transform: translate(x, y); */
-
- /* transform: translate(100px, 100px); */
-
- /* 1. 我们如果只移动x坐标 */
-
- /* transform: translate(100px, 0); */
-
- /* transform: translateX(100px); */
-
- /* 2. 我们如果只移动y坐标 */
-
- /* transform: translate(0, 100px); */
-
- /* transform: translateY(100px); */
-
- }
-
-
-
- div:first-child {
-
- transform: translate(30px, 30px);
-
- }
-
-
-
- div:last-child {
-
- background-color: purple;
-
- }
- div {
-
- position: relative;
-
- width: 500px;
-
- height: 500px;
-
- background-color: pink;
-
- /* 1. 我们tranlate里面的参数是可以用 % */
-
- /* 2. 如果里面的参数是 % 移动的距离是 盒子自身的宽度或者高度来对比的 */
-
- /* 这里的 50% 就是 50px 因为盒子的宽度是 100px */
-
- /* transform: translateX(50%); */
-
- }
-
- p {
-
- position: absolute;
-
- top: 50%;
-
- left: 50%;
-
- width: 200px;
-
- height: 200px;
-
- background-color: purple;
-
- /* margin-top: -100px;
-
- margin-left: -100px; */;
-
- /* 盒子往上走自己高度的一半 */
-
- transform: translate(-50%, -50%);
-
- }
- img {
-
- width: 150px;
-
- /* 顺时针旋转45度 */
-
- /* transform: rotate(45deg); */
-
- border-radius: 50%;
-
- border: 5px solid pink;
-
- /* 过渡写到本身上,谁做动画给谁加 */
-
- transition: all 0.3s;
-
- }
-
-
-
- img:hover {
-
- transform: rotate(90deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <img src="media/pic.jpg" alt="">
-
- </body>
- div {
-
- position: relative;
-
- width: 249px;
-
- height: 35px;
-
- border: 1px solid #000;
-
- }
-
- div::after {
-
- content: "";
-
- position: absolute;
-
- top: 8px;
-
- right: 15px;
-
- width: 10px;
-
- height: 10px;
-
- border-right: 1px solid #000;
-
- border-bottom: 1px solid #000;
-
- transform: rotate(45deg);
-
- transition: all 0.2s;
-
- }
-
- /* 鼠标经过div 里面的三角旋转 */
-
-
-
- div:hover::after {
-
- transform: rotate(225deg);
-
- }
1. gramática
origen-transformación:xy;
2. Puntos clave
·Tenga en cuenta que los siguientes parámetros xey están separados por espacios
·El punto central de la conversión predeterminada xy es el punto central del elemento (50%50%)
·También puedes configurar píxeles o nombres de orientación para xy (arriba, abajo, izquierda, derecha, centro)
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- margin: 100px auto;
-
- transition: all 1s;
-
- /* 1.可以跟方位名词 */
-
- /* transform-origin: left bottom; */
-
- /* 2. 默认的是 50% 50% 等价于 center center */
-
- /* 3. 可以是px 像素 */
-
- /* transform-origin: 80px 80px; */
-
- /* transform-origin: top left; */
-
- transform-origin: bottom right ;
-
- }
-
-
-
- div:hover {
-
- transform: rotate(360deg);
-
- }
- div {
-
- overflow: hidden;
-
- width: 200px;
-
- height: 200px;
-
- border: 1px solid pink;
-
- margin: 10px;
-
- float: left;
-
- }
-
- div::before {
-
- content: "小猪佩奇";
-
- display: block;
-
- width: 100%;
-
- height: 100%;
-
- background-image: url("./media/pig.jpg");
-
- transform: rotate(180deg);
-
- transform-origin: left bottom;
-
- transition: all 0.4s;
-
- }
-
- /* 鼠标经过div 里面的before 复原 */
-
-
-
- div:hover::before {
-
- transform: rotate(0deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
-
- <div></div>
-
- <div></div>
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- margin: 100px auto;
-
- /* transform-origin: left bottom; */
-
- }
-
-
-
- div:hover {
-
- /* 1. 里面写的数字不跟单位 就是倍数的意思 1 就是1倍 2就是 2倍 */
-
- /* transform: scale(x, y); */
-
- /* transform: scale(2, 2); */
-
- /* 2. 修改了宽度为原来的2倍 高度 不变 */
-
- /* transform: scale(2, 1); */
-
- /* 3. 等比例缩放 同时修改宽度和高度,我们有简单的写法 以下是 宽度修改了2倍,高度默认和第一个参数一样*/
-
- /* transform: scale(2); */
-
- /* 4. 我们可以进行缩小 小于1 就是缩放 */
-
- /* transform: scale(0.5, 0.5); */
-
- /* transform: scale(0.5); */
-
- /* 5. scale 的优势之处: 不会影响其他的盒子 而且可以设置缩放的中心点*/
-
- /* width: 300px;
-
- height: 300px; */
-
- transform: scale(2);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
-
- 123123
- li {
-
- float: left;
-
- width: 30px;
-
- height: 30px;
-
- border: 1px solid pink;
-
- margin: 10px;
-
- text-align: center;
-
- line-height: 30px;
-
- list-style: none;
-
- border-radius: 50%;
-
- /* 小手 */
-
- cursor: pointer;
-
- transition: all .4s;
-
- }
-
-
-
- li:hover {
-
- transform: scale(1.2);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <ul>
-
- <li>1</li>
-
- <li>2</li>
-
- <li>3</li>
-
- <li>4</li>
-
- <li>5</li>
-
- <li>6</li>
-
- <li>7</li>
-
- </ul>
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- transition: all .5s;
-
- }
-
-
-
- div:hover {
-
- /* transform: rotate(180deg) translate(150px, 50px); */
-
- /* 我们同时有位移和其他属性,我们需要把位移放到最前面 */
-
- transform: translate(150px, 50px) rotate(180deg) scale(1.2);
-
- }
La animación se divide en dos pasos:
1. Primero defina la animación
2. Reutilizar animación (llamada)
1. Utilice fotogramas clave para definir animaciones (similar a definir selectores de clases)
@keyframes nombre de la animación{
0%{
ancho: 100px;
}
100%{
ancho: 200 px;
}
}
2. Utilice animación para elementos.
división {
ancho: 200 px; alto: 200 px; color de fondo: aguamarina; margen: 100 px automático;
/*Animación de llamada*/
nombre-animación: nombre de la animación;
/*duración*/
duración de la animación: duración;
- /* 我们想页面一打开,一个盒子就从左边走到右边 */
-
- /* 1. 定义动画 */
-
-
-
- @keyframes move {
-
- /* 开始状态 */
-
- 0% {transform: translateX(0px);}
-
- /* 结束状态 */
-
- 100% {transform: translateX(1000px);}
-
- }
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- /* 2. 调用动画 */
-
- /* 动画名称 */
-
- animation-name: move;
-
- /* 持续时间 */
-
- animation-duration: 2s;
-
- }
- /* from to 等价于 0% 和 100% */
-
- /* @keyframes move {
-
- from {
-
- transform: translate(0, 0);
-
- }
-
- to {
-
- transform: translate(1000px, 0);
-
- }
-
- } */
-
- /* 动画序列 */
-
- /* 1. 可以做多个状态的变化 keyframe 关键帧 */
-
- /* 2. 里面的百分比要是整数 */
-
- /* 3. 里面的百分比就是 总的时间(我们这个案例10s)的划分 25% * 10 = 2.5s */
-
-
-
- @keyframes move {
-
- 0% {
-
- transform: translate(0, 0);
-
- }
-
- 25% {
-
- transform: translate(1000px, 0)
-
- }
-
- 50% {
-
- transform: translate(1000px, 500px);
-
- }
-
- 75% {
-
- transform: translate(0, 500px);
-
- }
-
- 100% {
-
- transform: translate(0, 0);
-
- }
-
- }
-
-
-
- div {
-
- width: 100px;
-
- height: 100px;
-
- background-color: pink;
-
- animation-name: move;
-
- animation-duration: 10s;
-
- }
Atributos | describir |
@fotogramas clave | Especificar animación |
animación | Propiedad abreviada para todas las propiedades de animación. |
nombre-de-animacion | Especifica el nombre de la animación @keyframes (obligatorio) |
duración de la animación | Especifica los segundos o milisegundos que tarda la animación en completar un ciclo. El valor predeterminado es 0. (necesario) |
función de temporización de animación | Especifica la curva de velocidad de la animación, el valor predeterminado es "facilidad" |
Retraso de animación | Especifica cuándo comienza la animación, el valor predeterminado es 0 |
recuento de iteraciones de la animación | Especifica el número de veces que se reproduce la animación, el valor predeterminado es 1 e infinito |
dirección de animación | Especifica si la animación se reproducirá al revés en el siguiente ciclo. El valor predeterminado es "normal", la alternativa se reproduce al revés. |
estado de reproducción de animación | Especifica si la animación se está ejecutando o en pausa, el valor predeterminado es "en ejecución" y "pausa". |
modo de relleno de animación | Especifique el estado después de que finalice la animación, continúe hacia adelante y regrese al inicio hacia atrás. |
- @keyframes move {
-
- 0% {
-
- transform: translate(0, 0);
-
- }
-
- 100% {
-
- transform: translate(1000px, 0);
-
- }
-
- }
-
-
-
- div {
-
- width: 100px;
-
- height: 100px;
-
- background-color: pink;
-
- /* 动画名称 */
-
- animation-name: move;
-
- /* 持续时间 */
-
- animation-duration: 2s;
-
- /* 运动曲线 */
-
- /* animation-timing-function: ease; */
-
- /* 何时开始 */
-
- animation-delay: 2s;
-
- /* 重复次数 iteration 重复的 conut 次数 infinite 无限 */
-
- /* animation-iteration-count: infinite; */
-
- /* 是否反方向播放 默认的是 normal 如果想要反方向 就写 alternate */
-
- /* animation-direction: alternate; */
-
- /* 动画结束后的状态 默认的是 backwards 回到起始状态 我们可以让他停留在结束状态 forwards */
-
- /* animation-fill-mode: forwards; */
-
- /* animation: name duration timing-function delay iteration-count direction fill-mode; */
-
- /* animation: move 2s linear 0s 1 alternate forwards; */
-
- /* 前面2个属性 name duration 一定要写 */
-
- /* animation: move 2s linear alternate forwards; */
-
- }
-
-
-
- div:hover {
-
- /* 鼠标经过div 让这个div 停止动画,鼠标离开就继续动画 */
-
- animation-play-state: paused;
-
- }
- body {
-
- background-color: #333;
-
- }
-
-
-
- .map {
-
- position: relative;
-
- width: 747px;
-
- height: 616px;
-
- background: url(media/map.png) no-repeat;
-
- margin: 0 auto;
-
- }
-
-
-
- .city {
-
- position: absolute;
-
- top: 227px;
-
- right: 193px;
-
- color: #fff;
-
- }
-
-
-
- .tb {
-
- top: 500px;
-
- right: 80px;
-
- }
-
-
-
- .dotted {
-
- width: 8px;
-
- height: 8px;
-
- background-color: #09f;
-
- border-radius: 50%;
-
- }
-
-
-
- .city div[class^="pulse"] {
-
- /* 保证我们小波纹在父盒子里面水平垂直居中 放大之后就会中心向四周发散 */
-
- position: absolute;
-
- top: 50%;
-
- left: 50%;
-
- transform: translate(-50%, -50%);
-
- width: 8px;
-
- height: 8px;
-
- box-shadow: 0 0 12px #009dfd;
-
- border-radius: 50%;
-
- animation: pulse 1.2s linear infinite;
-
- }
-
- .city div.pulse2 {
-
- animation-delay: 0.4s;
-
- }
-
-
-
- .city div.pulse3 {
-
- animation-delay: 0.8s;
-
- }
-
-
-
- @keyframes pulse {
-
- 0% {}
-
- 70% {
-
- /* transform: scale(5); 我们不要用scale 因为他会让 阴影变大*/
-
- width: 40px;
-
- height: 40px;
-
- opacity: 1;
-
- }
-
- 100% {
-
- width: 70px;
-
- height: 70px;
-
- opacity: 0;
-
- }
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div class="map">
-
- <div class="city">
-
- <div class="dotted"></div>
-
- <div class="pulse1"></div>
-
- <div class="pulse2"></div>
-
- <div class="pulse3"></div>
-
- </div>
-
- <div class="city tb">
-
- <div class="dotted"></div>
-
- <div class="pulse1"></div>
-
- <div class="pulse2"></div>
-
- <div class="pulse3"></div>
-
- </div>
-
- </div>
- div {
-
- overflow: hidden;
-
- font-size: 20px;
-
- width: 0;
-
- height: 30px;
-
- background-color: pink;
-
- /* 让我们的文字强制一行内显示 */
-
- white-space: nowrap;
-
- /* steps 就是分几步来完成我们的动画 有了steps 就不要在写 ease 或者linear 了 */
-
- animation: w 4s steps(10) forwards;
-
- }
-
-
-
- @keyframes w {
-
- 0% {
-
- width: 0;
-
- }
-
- 100% {
-
- width: 200px;
-
- }
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div>世纪佳缘我在这里等你</div>
- body {
-
- background-color: #ccc;
-
- }
-
-
-
- div {
-
- position: absolute;
-
- width: 200px;
-
- height: 100px;
-
- background: url(media/bear.png) no-repeat;
-
- /* 我们元素可以添加多个动画, 用逗号分隔 */
-
- animation: bear .6s steps(8) infinite, move 4s forwards;
-
- }
-
-
-
- @keyframes bear {
-
- 0% {
-
- background-position: 0 0;
-
- }
-
- 100% {
-
- background-position: -1600px 0;
-
- }
-
- }
-
-
-
- @keyframes move {
-
- 0% {
-
- left: 0;
-
- }
-
- 100% {
-
- left: 50%;
-
- /* margin-left: -100px; */
-
- transform: translateX(-50%);
-
- }
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
El sistema de coordenadas tridimensionales en realidad se refiere al espacio tridimensional, que se compone de tres ejes.
·Eje x: Horizontalmente hacia la derecha Nota: El lado derecho de X es un valor positivo y el lado izquierdo es un valor negativo
·Eje y: verticalmente hacia abajo. Nota: la parte inferior de y es un valor positivo y la parte superior es un valor negativo.
·Eje Z: Pantalla vertical Nota: Valores positivos hacia el exterior y valores negativos hacia el interior
traducir:translateX(100px): simplemente muévete en el eje x
traducir:translateY (100px): simplemente muévase en el eje Y
translform:translateZ (100px): simplemente muévase en el eje z (nota: traducirZ generalmente está en unidades px) transform:translate3d (x, y,): donde x, y y z respectivamente se refieren a la distancia en la dirección de el eje a mover.
- body {
-
- /* 透视写到被观察元素的父盒子上面 */
-
- perspective: 200px;
-
- }
-
-
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- /* transform: translateX(100px);
-
- transform: translateY(100px); */
-
- /* transform: translateX(100px) translateY(100px) translateZ(100px); */
-
- /* 1. translateZ 沿着Z轴移动 */
-
- /* 2. translateZ 后面的单位我们一般跟px */
-
- /* 3. translateZ(100px) 向外移动100px (向我们的眼睛来移动的) */
-
- /* 4. 3D移动有简写的方法 */
-
- /* transform: translate3d(x,y,z); */
-
- /* transform: translate3d(100px, 100px, 100px); */
-
- /* 5. xyz是不能省略的,如果没有就写0 */
-
- transform: translate3d(200px, 100px, 100px);
-
- }
- body {
-
- perspective: 600px;
-
- /* 透视写到被观擦元素的父盒子上面 */
-
- }
-
-
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- margin: 100px auto;
-
- transform: translateZ(0);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- </body>
- body {
-
- perspective: 300px;
-
- }
-
-
-
- img {
-
- display: block;
-
- margin: 100px auto;
-
- transition: all 1s;
-
- }
-
-
-
- img:hover {
-
- transform: rotateX(45deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <img src="media/pig.jpg" alt="">
-
-
- body {
-
- perspective: 500px;
-
- }
-
-
-
- img {
-
- display: block;
-
- margin: 100px auto;
-
- transition: all 1s;
-
- }
-
-
-
- img:hover {
-
- /* transform: rotateZ(180deg); */
-
- /* transform: rotate3d(x,y,z,deg); */
-
- /* transform: rotate3d(1, 0, 0, 45deg); */
-
- /* transform: rotate3d(0, 1, 0, 45deg); */
-
- transform: rotate3d(1, 1, 0, 45deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <img src="media/pig.jpg" alt="">
·Controlar si el elemento hijo activa el entorno tridimensional. .
·Estilo de transformación: el subelemento plano no habilita el espacio 3D de forma predeterminada
·Transform-style:preserve-3d; el subelemento abre un espacio tridimensional.
·El código se escribe en el cuadro principal, pero afecta al cuadro secundario.
- body {
-
- perspective: 500px;
-
- }
-
-
-
- .box {
-
- position: relative;
-
- width: 200px;
-
- height: 200px;
-
- margin: 100px auto;
-
- transition: all 2s;
-
- /* 让子元素保持3d立体空间环境 */
-
- transform-style: preserve-3d;
-
- }
-
-
-
- .box:hover {
-
- transform: rotateY(60deg);
-
- }
-
-
-
- .box div {
-
- position: absolute;
-
- top: 0;
-
- left: 0;
-
- width: 100%;
-
- height: 100%;
-
- background-color: pink;
-
- }
-
-
-
- .box div:last-child {
-
- background-color: purple;
-
- transform: rotateX(60deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div class="box">
-
- <div></div>
-
- <div></div>
-
- </div>
1. Construya una estructura HTML
<div class="box">
<div class="front">Programador caballo oscuro</div>
<div class="back">La maestra rosa te está esperando.</div>
</div>
·El cuadro principal contiene dos cuadros secundarios antes y después.
·La caja es una caja volteada, el frente es la caja frontal y la parte posterior es la caja posterior.
- body {
-
- perspective: 400px;
-
- }
-
- .box {
-
- position: relative;
-
- width: 300px;
-
- height: 300px;
-
- margin: 100px auto;
-
- transition: all .4s;
-
- /* 让背面的紫色盒子保留立体空间 给父级添加的 */
-
- transform-style: preserve-3d;
-
- }
-
-
-
- .box:hover {
-
- transform: rotateY(180deg);
-
- }
-
-
-
- .front,
-
- .back {
-
- position: absolute;
-
- top: 0;
-
- left: 0;
-
- width: 100%;
-
- height: 100%;
-
- border-radius: 50%;
-
- font-size: 30px;
-
- color: #fff;
-
- text-align: center;
-
- line-height: 300px;
-
- }
-
- .front {
-
- background-color: pink;
-
- z-index: 1;
-
- }
-
-
-
- .back {
-
- background-color: purple;
-
- /* 像手机一样 背靠背 旋转 */
-
- transform: rotateY(180deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="back">pink老师这里等你</div>
-
- </div>
- * {
-
- margin: 0;
-
- padding: 0;
-
- }
-
-
-
- ul {
-
- margin: 100px;
-
- }
-
-
-
- ul li {
-
- float: left;
-
- margin: 0 5px;
-
- width: 120px;
-
- height: 35px;
-
- list-style: none;
-
- /* 一会我们需要给box 旋转 也需要透视 干脆给li加 里面的子盒子都有透视效果 */
-
- perspective: 500px;
-
- }
-
-
-
- .box {
-
- position: relative;
-
- width: 100%;
-
- height: 100%;
-
- transform-style: preserve-3d;
-
- transition: all .4s;
-
- }
-
-
-
- .box:hover {
-
- transform: rotateX(90deg);
-
- }
-
-
-
- .front,
-
- .bottom {
-
- position: absolute;
-
- left: 0;
-
- top: 0;
-
- width: 100%;
-
- height: 100%;
-
- }
-
-
-
- .front {
-
- background-color: pink;
-
- z-index: 1;
-
- transform: translateZ(17.5px);
-
- }
-
-
-
- .bottom {
-
- background-color: purple;
-
- /* 这个x轴一定是负值 */
-
- /* 我们如果有移动 或者其他样式,必须先写我们的移动 */
-
- transform: translateY(17.5px) rotateX(-90deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <ul>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- </ul>
- body {
-
- perspective: 1000px;
-
- }
-
-
-
- section {
-
- position: relative;
-
- width: 300px;
-
- height: 200px;
-
- margin: 150px auto;
-
- transform-style: preserve-3d;
-
- /* 添加动画效果 */
-
- animation: rotate 10s linear infinite;
-
- background: url(media/pig.jpg) no-repeat;
-
- }
-
-
-
- section:hover {
-
- /* 鼠标放入section 停止动画 */
-
- animation-play-state: paused;
-
- }
-
-
-
- @keyframes rotate {
-
- 0% {
-
- transform: rotateY(0);
-
- }
-
- 100% {
-
- transform: rotateY(360deg);
-
- }
-
- }
-
-
-
- section div {
-
- position: absolute;
-
- top: 0;
-
- left: 0;
-
- width: 100%;
-
- height: 100%;
-
- background: url(media/dog.jpg) no-repeat;
-
- }
-
- /* 正对着的图片 z轴*/
-
- section div:nth-child(1) {
-
- transform: rotateY(0) translateZ(300px);
-
- }
-
- /* 右边的图片 */
-
- section div:nth-child(2) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(60deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(3) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(120deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(4) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(180deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(5) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(240deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(6) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(300deg) translateZ(300px);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <section>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- </section>
-moz-: representa propiedades privadas del navegador Firefox
-ms-: representa los atributos privados del navegador IE
-webkit-: representa propiedades privadas de safari y chrome
-o-: representa propiedades privadas de Opera
2. El método de escritura defendido
-radio del borde moz: 10 px;
-radio del borde del webkit: 10 px;
-o-radio-del-borde:10px;radio-del-borde:10px;