1.transition
Syntax: transition: property duration timing-function delay;
Transition-property Set the css property name of the transition effect
Syntax: transition-property: none | all | property
None No properties will get transition effects
All properties will get transition effects.
property defines a list of CSS property names for applying transition effects. The list is separated by commas.
]over how many seconds or milliseconds it takes to complete the transition effect
Syntax: transition-duration: time; The default value is 0, which means there will be no effect.
Transition-timing-function specifies the speed curve of the speed effect.
Syntax: transition-timing-function: linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n);
Linear specifies the same speed A transitional effect from start to finish.
ease stipulates to start at a slow speed, then go fast, and then end at a slow speed.
ease-in specifies an excessive effect that starts at a slow speed.
ease-out specifies an excessive effect that ends at a slow speed.
ease-in-out specifies a transition effect that starts and ends at a slow speed.
cubic-bezier(n,n,n,n) Define your own value in cubic-bezier. Possible values are values between 0 and 1.
transition-delay Defines when the transition effect starts
Syntax: transititon-delay: time;
time specifies the time to wait before the transition effect starts.
Example:
## Example: (Bezier curve)
1.295,0.000,1.610);}
.box:hover{width:500px;}
Result: As shown in the figure
uting Me >> .box{width:100px;height:100px;background :red; transition:1swidth,2s height,3s background;}
.box:hover{width:300px;height:150px;background:blue;}
Result: As shown in the figure
##2.transform
The letters are transformed. The meaning of change, in CSS3, transform mainly includes the following types, rotation rotate, skew, scale and translate, as well as matrix transformation matrix
Syntax: transform: none |
None means how to transform without entering;
But when using multiple attributes in transform, they need to be separated by spaces. Remember, they are separated by spaces.
rotate
over forward in word to specify a 2D rotation (2D rotation) on the original element through the specified angle parameter, you need to first define the transform-origin attribute.
ccogene Over in in >>, where angle refers to the angle of rotation
If the set value is a positive number, it means clockwise rotation, if the set value is a negative number, it means counterclockwise rotation.
Move at the same time); translateX(x) only moves in the horizontal direction (X-axis movement) translateY(Y) only moves in the vertical direction (Y-axis movement)
Scale
The scaleY(y) element only scales in the vertical direction (Y-axis scaling), but they have the same scaling center point and base,
Its center point is the center position of the element, and the scaling base is 1. If its value is greater than 1 element If the value is less than 1, the element will shrink. At the same time, it is distorted according to a certain angle value); skewX(x) only distorts the element in the horizontal direction (X-axis distortion);
skewY(y) only makes the element distorted in the vertical direction (Y Axis twist deformation)
Matrix matrix
Specifying a 2D transformation in the form of a six-valued (a, b, c, d, e, f) transformation matrix is equivalent to directly applying a [a b c d e f] transformation matrix, which is based on the horizontal direction (X axis). Reposition the element in the vertical direction (Y-axis) and change the base point of the element transform-origin. Its main function is to allow us to change the base point position of the element before performing the transform action,
.box:hover { -webkit-transform:rotate(45deg);}
## transition:2s;}
.box:hover{-webkit-transform:translate(-100px,200px);}
/p>
Result: The position of the element changes.
Example: (zoom) box: hover{webkit-transform:scale(2);}
# }
.box:hover{-webkit-transform:skewX(45deg);}
111
: As shown in the figure
Example: (matrix) 100px auto 0; transition:2s;}
111
Result: as shown
demo 示例:
<script><br/> var oList=document.getElementById("list");<br/> var oCss=document.getElementById("css");<br/> var oHour=document.getElementById("hour");<br/> var oMin=document.getElementById("min");<br/> var oSec=document.getElementById("sec");<br/> var aLi="";<br/> var sCss="";<br/> for(var i=0;i<60;i++)<br/> {<br/> sCss+="#wrap ul li:nth-of-type("+(i+1)+"){ -webkit-transform:rotate("+i*6+"deg);}";<br/> aLi+="<li>"<br/> }<br/> oList.innerHTML=aLi;<br/> oCss.innerHTML+=sCss;<br/> toTime();<br/> setInterval(toTime,1000);<br/> function toTime()<br/> {<br/> var oDate=new Date();<br/> var iSec=oDate.getSeconds();<br/> var iMin=oDate.getMinutes()+iSec/60;<br/> var iHour=oDate.getHours()+iMin/60;<br/> oSec.style.WebkitTransform="rotate("+iSec*6+"deg)";<br/> oMin.style.WebkitTransform="rotate("+iMin*6+"deg)";<br/>oHour.style.WebkitTransform = "rotate("+iHour*30+"deg)"; <br/>##For more articles related to css3 transition and 2d transformation, please pay attention to the PHP Chinese website! <br/></script>

In a perfect world, our projects would have unlimited resources and time. Our teams would begin coding with well thought out and highly refined UX designs.

Oh, the Many Ways to Make Triangular Breadcrumb Ribbons

SVG has its own set of elements, attributes and properties to the extent that inline SVG code can get long and complex. By leveraging CSS and some of the forthcoming features of the SVG 2 specification, we can reduce that code for cleaner markup.

You might not know this, but JavaScript has stealthily accumulated quite a number of observers in recent times, and Intersection Observer is a part of that

We may not need to throw out all CSS animations. Remember, it’s prefers-reduced-motion, not prefers-no-motion.

PWA (Progressive Web Apps) have been with us for some time now. Yet, each time I try explaining it to clients, the same question pops up: "Will my users be

It's extremely surprising to me that HTML has never had any way to include other HTML files within it. Nor does there seem to be anything on the horizon that

There are a lot of different ways to use SVG. Depending on which way, the tactic for recoloring that SVG in different states or conditions — :hover,


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools