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 > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to use the CSS steps () function to achieve random flipping effect of the relevant knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe you will have something to gain after reading this article on how to use the CSS steps () function to achieve random flipping effect, let's take a look.
CSS doesn't have a built-in "random" function, like the Math.random () function in Javascript, and it doesn't generate random numbers or random colors at all.
Based on the above problems, we need to change ideas and let the elements achieve random effects through complex animation. The principle of implementation allows the cards to quickly show different states, allowing the cards to cycle through all 52 states in 1 second, and the user clicks on each card to pause the animation and flip the cards.
The deficiency of this scheme is that the same pattern and face of the three cards can not be avoided.
Generalization
The idea of using animation to make elements look random is not very interesting and a little unexpected, and most users definitely don't realize it when they see this effect.
Now CSS is much more than what we see now. What it can bring depends on creativity. I have always believed that there are no impossible interactions, only unexpected interactions.
Keystone
The effect mainly uses the animation attribute animation in CSS, customize an animation process randomAnim, click through the classic input checkbox + label combination, animation controller animation-play-state: paused and animation-play-state: running;, below is the key steps ().
Steps () is a step function (timing-function) that allows animation or transition effects to be divided into segments rather than transitions that persist from one state to another. This function takes two parameters:
The first parameter is a positive value that specifies the number of segments I want the animation to split.
The second parameter is optional and can be set: start and end, which indicates a step change at the beginning or end of each interval. The default is end. For example, steps (1 minute start), the animation is divided into 1 step, and the part at the left end of the animation is the beginning; steps (1 at the end), the animation is divided into 1 step, and the part at the end of the animation at the right end is the beginning.
The step function (timing-function) is used between every two keyframes, not the entire animation.
This is the end of the article on "how to use the CSS steps () function to achieve random flipping effect". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use the CSS steps () function to achieve random flipping effect". If you want to learn more, you are welcome to follow the industry information channel.
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.