当前位置:网站首页>H5 embedded app adapts to dark mode
H5 embedded app adapts to dark mode
2022-07-05 06:27:00 【Heerey525】
situation : The project is vue
It's done H5
page , It needs to be embedded in App
Medium to dark mode , however H5 There needs to be a loading process , There will be a flash of white ( Rendering is not complete )
resolvent : stay public/index.html
Add CSS
Media query , The code is as follows
<style type="text/css">
@media (prefers-color-scheme: no-preference) {
body {
background-color: #fff !important;
}
}
@media (prefers-color-scheme: light) {
body {
background-color: #fff !important;
}
}
@media (prefers-color-scheme: dark) {
body {
background-color: rgba(0,0,0,28) !important;
}
}
</style>
边栏推荐
- Leetcode-1200: minimum absolute difference
- [leetcode] day95 effective Sudoku & matrix zeroing
- 11-gorm-v2-03-basic query
- __ builtin_ Popcount() counts the number of 1s, which are commonly used in bit operations
- Gaussian elimination acwing 884 Gauss elimination for solving XOR linear equations
- Alibaba established the enterprise digital intelligence service company "Lingyang" to focus on enterprise digital growth
- MySQL advanced part 2: MySQL architecture
- MPLS experiment
- 4.Oracle-重做日志文件管理
- Leetcode-6108: decrypt messages
猜你喜欢
将webApp或者H5页面打包成App
3. Oracle control file management
博弈论 AcWing 891. Nim游戏
LeetCode-54
SQL三种连接:内连接、外连接、交叉连接
Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
Leetcode array operation
[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
Design specification for mobile folding screen
P2575 master fight
随机推荐
MySQL advanced part 2: storage engine
博弈论 AcWing 891. Nim游戏
Leetcode array operation
Stack acwing 3302 Expression evaluation
LeetCode-61
2048项目实现
【LeetCode】Day94-重塑矩阵
求组合数 AcWing 888. 求组合数 IV
2022-5-第四周日报
[leetcode] day94 reshape matrix
7.Oracle-表结构
Bit of MySQL_ OR、BIT_ Count function
TypeScript 基础讲解
Interval problem acwing 906 Interval grouping
高斯消元 AcWing 884. 高斯消元解异或線性方程組
H5 模块悬浮拖动效果
Find the combination number acwing 889 01 sequence meeting conditions
MySQL advanced part 2: SQL optimization
【LeetCode】Day95-有效的数独&矩阵置零
ollvm编译出现的问题纪录