国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
Transition
Animation
Home Web Front-end HTML Tutorial Summary of CSS3 Transform, Transition and Animation properties

Summary of CSS3 Transform, Transition and Animation properties

Apr 16, 2017 pm 02:31 PM

Three properties of CSS3 related to deformation and animation ##:

Trans

form

Browser support:

Internet Explorer 10 , Firefox, Opera support the transform attribute.

Internet Explorer 9 supports the alternative -ms-transform attribute (only for 2D transformations)

Safari and

Chr

ome support. Alternative -webkit-transform property (3D and 2D transforms) Opera only supports 2D transforms

##Function

Description##translate(x,y)Define 2D transformation, move elements along the X and Y axesrotate(angle)Define 2D rotation, specify the angle in the parametersscale(x,y)Define 2D scaling transformation, change the width and height of the elementskew(x-angle,y-angle )Define 2D tilt transformation, along the X and Y axes##matrix(n,n,n,n,n,n)
  • The translate(x, y) method moves from the current element position according to the parameters given by the left (X-axis) and top (Y-axis) positions. The values ??of x and y can be positive or negative, which respectively represent offsets in different directions.

  • rotate(angle) method represents the angle of rotation. When angle is positive, the element rotates clockwise; when it is negative, the element rotates counterclockwise.

  • scale(x, y) method indicates the scaling ratio of the element on the x-axis and y-axis. When the parameter is greater than 1, the element is enlarged; when it is less than 1, the element is reduced.

  • skew(x-angle,y-angle) method is used to distort elements. The first parameter is the horizontal distortion angle, and the second parameter is the vertical direction. Twist angle. The second parameter is an optional parameter. If the second parameter is not set, the Y axis is 0deg

  • matrix(n,n,n,n,n,n) method , specify a 2D transformation in the form of a transformation matrix containing six values. This attribute value uses the matrix

transform-origin involved in mathematics. Attribute

The transform methods we mentioned earlier are all based on the center of the element. That is, the base point of the element transformation is the center of the element by default. But sometimes we need to perform these operations on elements at different positions, then we can use transform-origin to change the base position of the element. This attribute can receive three parameters:

transform-origin: x-axis y-axis z-axis;

  • x-axis, indicating the horizontal direction. The value can be the character parameter value left, center right, or the percentage. The corresponding percentage value of the character parameter value is left=0%; center=50%; right=100%.

  • y-axis, indicating the value in the vertical direction, you can also set the character value top, center, bottom, or Take the percentage. The percentage values ??corresponding to the character parameter values ??are top=0%; center=50%; bottom=100%.

  • z-axis, indicating where the view is placed on the Z axis, used in 3D deformation.

3D transform transformation method

Internet Explorer 10 and Firefox support 3D transformation.
Chrome and Safari must add the prefix -webkit-.
Opera does not yet support 3D transformations (2D transformations are supported).

Three-dimensional transformations use the same properties based on two-dimensional transformations. 3D transformation in CSS3 mainly includes the following functional functions:

  • 3D displacement: 3D displacement in CSS3 mainly includes translateZ() and translate3d() Functional functions;

  • 3D rotation: 3D rotation in CSS3 mainly includes four functional functions: rotateX(), rotateY(), rotateZ() and rotate3d();

  • 3D scaling: 3D scaling in CSS3 mainly includes two functional functions: scaleZ() and scale3d();

  • 3D matrix: 3D deformation neutralization in CSS3 2D deformation also has a 3D matrix function function matrix3d().

There are also the following transformation attributes:

    • transform-style: Specifies how nested elements are displayed in 3D space .

    • perspective: Specifies the perspective effect of 3D elements.

    • perspective-origin: Specifies the bottom position of the 3D element.

    • backface-visibility: Defines whether the element is visible when not facing the screen.

Currently, the compatibility of the transform 3d attribute in major mainstream browsers is not particularly good. Interested readers can learn more about it on their own. Below we introduce several commonly used functional methods:

rotateX() method, rotate the element around the X axis at a given degree;
rotateY() method, rotate it around the Y axis at a given degree Axis-rotated element;
rotateZ() method, rotates an element around its Z-axis at a given degree.

Transition

W3CThe transition of css3 is described in the standard like this: "The transition of css allows css The attribute value transitions smoothly within a certain time interval. This effect can be triggered by mouse click, focus, click, or any change to the element, and smoothly changes the CSS attribute value with animation effect.”## The value of the

#transition attribute includes the following four:

    • transition-property: Specifies which css attribute of the

      HTML element is used for transition gradient processing , this attribute can be various standard css attributes such as color, width, height, etc.

    • transition-duration: Specifies the duration of attribute transition

    • transition-timing-function: Specify the speed of the gradient:
      1. ease: (gradually slows down) default value, the ease function is equivalent to the Bezier curve (0.25, 0.1, 0.25, 1.0);
      2. linear: (uniform speed), the linear function is equivalent to the Bezier curve (0.0, 0.0, 1.0, 1.0);
      3. ease-in: (acceleration), the ease-in function is equivalent to To the Bezier curve (0.42, 0, 1.0, 1.0);
      4. ease-out: (deceleration), the ease-out function is equivalent to the Bezier curve (0, 0, 0.58, 1.0);
      # 5. ease-in-out: (accelerate and then decelerate), the ease-in-out function is equivalent to the Bezier curve (0.42, 0, 0.58, 1.0);
      6. cubic-bezier: (this value allows You can customize a time curve), a specific cubic-bezier curve. The four values ??(x1, y1, x2, y2) are specific to points P1 and P2 on the curve. All values ??must be within the [0, 1] range, otherwise they will be invalid.

    • transition-delay: Specify the delay time, that is, how long it takes to start the transition process.

Browser Compatibility

Internet Explorer 9 and earlier version, the transition attribute is not supported.

Internet Explorer 10, Firefox, Opera and Chrome support the transition attribute. Chrome 25 and earlier and Safari require the prefix -webkit-.

Animation

To use animation animation, you must first familiarize yourself with keyframes and the grammatical rules of Keyframes: naming is It starts with "@keyframes", followed by the "name of the animation" plus a pair of curly brackets "{}". In the brackets are some style rules for different time periods. Different keyframes are expressed by from (equivalent to 0%), to (equivalent to 100%) or percentage (in order to get the best browser support, it is recommended to use percentage),

@keyframes is defined. To make it work, it must be bound to a selector through animation, otherwise the animation will have no effect. The attributes of animation are listed below:

Define the 2D transformation using a matrix of six values
##animation-iteration-Specifies the number of times the animation is playedThe default is 1 (infinite: unlimited timesanimation- Specifies whether the animation will be played in reverse in the next cycle The default is "normal" (reverse: play in reverse; alternate: play forward in odd numbers, play in reverse in even numbers; alternate -reverse: Play in the reverse direction for odd times, and play forward for even times)##animation-play-stateThe default is "running" (paused: paused animation)
Attribute Description Value
animation Abbreviated attribute for all animation attributes, except animation-play-state attribute
animation-name Specifies the name of @keyframes animation
animation-duration Specifies the seconds or milliseconds it takes for the animation to complete a cycle The default is 0
animation-timing-function Specifies the speed curve of the animation The default is "ease"
animation-delay Specifies when the animation starts The default is 0
count
direction
Specifies whether the animation is running or paused

##Browse Server compatibility

##Internet Explorer 10, Firefox and Opera support @keyframes rules and animation attributes Chrome and Safari require the prefix -webkit-

Note: Internet Explorer 9, and earlier versions, do not support @keyframe rules or animation attributes

The above content comes from: http://blog.csdn.net/u014607184/article/details. /51801393

The above is the detailed content of Summary of CSS3 Transform, Transition and Animation properties. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How do I stay up-to-date with the latest HTML standards and best practices? How do I stay up-to-date with the latest HTML standards and best practices? Jun 20, 2025 am 08:33 AM

The key to keep up with HTML standards and best practices is to do it intentionally rather than follow it blindly. First, follow the summary or update logs of official sources such as WHATWG and W3C, understand new tags (such as) and attributes, and use them as references to solve difficult problems; second, subscribe to trusted web development newsletters and blogs, spend 10-15 minutes a week to browse updates, focus on actual use cases rather than just collecting articles; second, use developer tools and linters such as HTMLHint to optimize the code structure through instant feedback; finally, interact with the developer community, share experiences and learn other people's practical skills, so as to continuously improve HTML skills.

How do I use the  element to represent the main content of a document? How do I use the element to represent the main content of a document? Jun 19, 2025 pm 11:09 PM

The reason for using tags is to improve the semantic structure and accessibility of web pages, make it easier for screen readers and search engines to understand page content, and allow users to quickly jump to core content. Here are the key points: 1. Each page should contain only one element; 2. It should not include content that is repeated across pages (such as sidebars or footers); 3. It can be used in conjunction with ARIA properties to enhance accessibility. Usually located after and before, it is used to wrap unique page content, such as articles, forms or product details, and should be avoided in, or in; to improve accessibility, aria-labeledby or aria-label can be used to clearly identify parts.

How do I create checkboxes in HTML using the  element? How do I create checkboxes in HTML using the element? Jun 19, 2025 pm 11:41 PM

To create an HTML checkbox, use the type attribute to set the element of the checkbox. 1. The basic structure includes id, name and label tags to ensure that clicking text can switch options; 2. Multiple related check boxes should use the same name but different values, and wrap them with fieldset to improve accessibility; 3. Hide native controls when customizing styles and use CSS to design alternative elements while maintaining the complete functions; 4. Ensure availability, pair labels, support keyboard navigation, and avoid relying on only visual prompts. The above steps can help developers correctly implement checkbox components that have both functional and aesthetics.

How do I minimize the size of HTML files? How do I minimize the size of HTML files? Jun 24, 2025 am 12:53 AM

To reduce the size of HTML files, you need to clean up redundant code, compress content, and optimize structure. 1. Delete unused tags, comments and extra blanks to reduce volume; 2. Move inline CSS and JavaScript to external files and merge multiple scripts or style blocks; 3. Simplify label syntax without affecting parsing, such as omitting optional closed tags or using short attributes; 4. After cleaning, enable server-side compression technologies such as Gzip or Brotli to further reduce the transmission volume. These steps can significantly improve page loading performance without sacrificing functionality.

How do I create a basic HTML document? How do I create a basic HTML document? Jun 19, 2025 pm 11:01 PM

To create a basic HTML document, you first need to understand its basic structure and write code in a standard format. 1. Use the declaration document type at the beginning; 2. Use the tag to wrap the entire content; 3. Include and two main parts in it, which are used to store metadata such as titles, style sheet links, etc., and include user-visible content such as titles, paragraphs, pictures and links; 4. Save the file in .html format and open the viewing effect in the browser; 5. Then you can gradually add more elements to enrich the page content. Follow these steps to quickly build a basic web page.

How has HTML evolved over time, and what are the key milestones in its history? How has HTML evolved over time, and what are the key milestones in its history? Jun 24, 2025 am 12:54 AM

HTMLhasevolvedsignificantlysinceitscreationtomeetthegrowingdemandsofwebdevelopersandusers.Initiallyasimplemarkuplanguageforsharingdocuments,ithasundergonemajorupdates,includingHTML2.0,whichintroducedforms;HTML3.x,whichaddedvisualenhancementsandlayout

How do I use the  element to represent the footer of a document or section? How do I use the element to represent the footer of a document or section? Jun 25, 2025 am 12:57 AM

It is a semantic tag used in HTML5 to define the bottom of the page or content block, usually including copyright information, contact information or navigation links; it can be placed at the bottom of the page or nested in, etc. tags as the end of the block; when using it, you should pay attention to avoid repeated abuse and irrelevant content.

How do I embed video in HTML using the  element? How do I embed video in HTML using the element? Jun 20, 2025 am 10:09 AM

To embed videos in HTML, use tags and specify the video source and attributes. 1. Use src attributes or elements to define the video path and format; 2. Add basic attributes such as controls, width, height; 3. To be compatible with different browsers, you can list MP4, WebM, Ogg and other formats; 4. Use controls, autoplay, muted, loop, preload and other attributes to control the playback behavior; 5. Use CSS to realize responsive layout to ensure that it is adapted to different screens. Correct combination of structure and attributes can ensure good display and functional support of the video.

See all articles