In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the relevant knowledge of "case analysis of CSS deformation and transition". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope this article "case analysis of CSS deformation and transition" can help you solve the problem.
1. Transition transition
Transition attribute usage: transition:ransition-propertytransition-durationtransition-timing-functiontransition-delay
It can be specified together or separately.
Transition-property: is the attribute to be transitioned (such as width,height), and all is everything changed.
Transition-duration: time spent in s or ms
Transition-timing-function: specifies the type of animation (motion area curve). There are several motion curves
Ease= > gradually slow down (default) linear= > uniform ease-in= > acceleration ease-out= > deceleration ease-in-out= > acceleration before deceleration
Transition-delay delay time in s or ms
Document
P {
Width:100px
Height:200px
Background-color:aqua
Transition:width3sease-in-out0.5s
}
P:hover {
Width:500px
}
The result is as follows: when the mouse is up, the change is no longer instantaneous, but the transition is complete.
2. Deformable transform
2D deformation
Mobile translate (XBI y)
Move can specify either a pixel value or a percentage, note that the specified percentage is a percentage of its own size, so it can be used to set the center alignment when the box is positioned (move its own-50% after setting left:50%).
Document
P {
Width:100px
Height:100px
Background-color:aqua
Transition:all2s
}
P:active {
Transform:translate (200pxMae 200px)
}
After clicking, the box is moved. The code used to center the positioning box.
Document
.fa {
Width:300px
Height:300px
Background-color:aqua
Transition:all0.5s
Position:relative
}
.son {
Background-color:red
Position:absolute
Left:50%
Top:50%
Width:100px
Height:100px
Transform:translate (- 50% Mo Mo 50%)
}
This is the end of the introduction of "case Analysis of CSS deformation and transition". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.