[CSS] prefers-reduced-motion
2024-10-20 08:38:09
The prefers-reduced-motion
CSS media feature is used to detect if the user has requested that the system minimize the amount of animation or motion it uses.
In English, you can use prefers-reduced-motion to remove animation.
Why should we do it?
For low end device, the animation may looks bad, therefore we can use prefers-reduced-motion to improve this case.
@media (prefers-reduced-motion: reduce) {
.portal-transition {
transition: transform 0.001s;
}
} .animation {
animation: vibrate 0.3s linear infinite both;
} @media (prefers-reduced-motion: reduce) {
.animation {
animation: none;
}
}
最新文章
- Django博客功能实现—文章评论的显示
- HIS与CIS的区别与联系
- observer观察者模式
- UVALive 7079 - How Many Maos Does the Guanxi Worth(最短路Floyd)
- Surrounded Regions
- Windows Server 2008找回密码
- 【高级JEE技术】JMS
- ASP.NET Core + Angular 2 Template for Visual Studio
- Java Concurrent Topics
- Mysql [Err] 1292 - Truncated incorrect DOUBLE value
- 第一课——git的简介和基本使用
- STL——string
- 题目--oil Deposits(油田) 基础DFS(深度搜索)
- 机器学习技法笔记:09 Decision Tree
- linux ssh修改 默认22端口
- docker --alpine包管理工具 --apk
- android--------自定义Dialog之信息提示
- python learning OOP1.py
- aliyun oss 文件上传 java.net.SocketTimeoutException Read timed out 问题分析及解决
- hdu 1849 Rabbit and Grass(nim)