当前位置:网站首页>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>
边栏推荐
- 求组合数 AcWing 888. 求组合数 IV
- Relevant information of National Natural Science Foundation of China
- P2575 master fight
- TypeScript入门
- 2022-5-第四周日报
- 2021apmcm post game Summary - edge detection
- International Open Source firmware Foundation (osff) organization
- MySQL advanced part 1: index
- P3265 [jloi2015] equipment purchase
- ADG5412FBRUZ-RL7应用 双电源模拟开关和多路复用器IC
猜你喜欢
论文阅读报告
4.Oracle-重做日志文件管理
Quickly use Amazon memorydb and build your own redis memory database
Operator priority, one catch, no doubt
Game theory acwing 891 Nim games
【LeetCode】Easy | 20. Valid parentheses
NotImplementedError: Cannot convert a symbolic Tensor (yolo_boxes_0/meshgrid/Size_1:0) to a numpy ar
Game theory acwing 894 Split Nim game
SQL三种连接:内连接、外连接、交叉连接
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
随机推荐
FFmpeg build下载(包含old version)
Sword finger offer II 058: schedule
1.手动创建Oracle数据库
1.15 - input and output system
TypeScript 基础讲解
New title of module a of "PanYun Cup" secondary vocational network security skills competition
LeetCode 1200. Minimum absolute difference
MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理
5. Oracle TABLESPACE
How to generate an image from text on fly at runtime
[wustctf2020] plain_ WP
高斯消元 AcWing 884. 高斯消元解异或线性方程组
WordPress switches the page, and the domain name changes back to the IP address
20220213-CTF MISC-a_ good_ Idea (use of stegsolve tool) -2017_ Dating_ in_ Singapore
MPLS experiment
TypeScript入门
[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
2.Oracle-数据文件的添加及管理
背包问题 AcWing 9. 分组背包问题
LeetCode-61