Introduction to the new transition attribute in css3 (with examples)

不言
Release: 2018-08-28 11:17:33
Original
1648 people have browsed it

This article brings you an introduction to the new transition attribute in CSS3 (with examples). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

A new module transition has been added in CSS3, which can trigger changes in the appearance of elements through some simple CSS events, making the effect more delicate.
It is a composite attribute, mainly including the following sub-attributes.

transition-property: Specify the CSS property of transition or dynamic simulation
transition-duration: Specify the time required to complete the transition
transition-timing-function: Specify the transition function
transition-delay :Specify the delay time for the start of appearance

For example:

transition: background-color .5s ease .1s;
Copy after login

Special note: When the "transition-property" attribute is set to all, it represents the properties of all midpoint values.

Example:

width: 200px;
  height: 200px;
  background: red;
  margin: 20px auto;
  -webkit-transition-property: width;
  transition-property: width;
  -webkit-transition-duration:.5s;
  transition-duration:.5s;
  -webkit-transition-timing-function: ease-in;
  transition-timing-function: ease-in;
  -webkit-transition-delay: .18s;
  transition-delay:.18s;
Copy after login

You can also set individual properties.

Related recommendations:

CSS3 transition property_html/css_WEB-ITnose

##Detailed explanation and example sharing of Transition property in CSS3 _CSS/HTML

The above is the detailed content of Introduction to the new transition attribute in css3 (with examples). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!