当前位置:网站首页>H5内嵌App适配暗黑模式
H5内嵌App适配暗黑模式
2022-07-05 06:23:00 【Heerey525】
情况:项目是vue做的H5页面,需要嵌入到App中适配暗黑模式,但是H5需要有个加载的过程,就会出现一闪而过的白色(未渲染完成)
解决方法:在public/index.html中添加CSS媒体查询,代码如下
<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>
边栏推荐
- 5.Oracle-錶空間
- Interval problem acwing 906 Interval grouping
- Leetcode-1200: minimum absolute difference
- 【LeetCode】Day95-有效的数独&矩阵置零
- MySQL advanced part 1: stored procedures and functions
- Game theory acwing 892 Steps Nim game
- Leetcode-6109: number of people who know secrets
- Quickly use Amazon memorydb and build your own redis memory database
- Leetcode stack related
- Client use of Argo CD installation
猜你喜欢

AE tutorial - path growth animation

Client use of Argo CD installation

5.Oracle-錶空間

What is socket? Basic introduction to socket

Liunx starts redis

Find the combination number acwing 888 Find the combination number IV

高斯消元 AcWing 884. 高斯消元解异或線性方程組

MySQL advanced part 1: stored procedures and functions

Redis publish subscribe command line implementation

Bit of MySQL_ OR、BIT_ Count function
随机推荐
[BMZCTF-pwn] ectf-2014 seddit
Redis publish subscribe command line implementation
Ffmpeg build download (including old version)
Gauss Cancellation acwing 884. Solution d'un système d'équations Xor linéaires par élimination gaussienne
WordPress switches the page, and the domain name changes back to the IP address
Leetcode-22: bracket generation
Inclusion exclusion principle acwing 890 Divisible number
Real time clock (RTC)
MySQL advanced part 1: triggers
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
Is it impossible for lamda to wake up?
Leetcode-556: the next larger element III
LeetCode-54
How to make water ripple effect? This wave of water ripple effect pulls full of retro feeling
Install opencv -- CONDA to establish a virtual environment and add the kernel of this environment in jupyter
Leetcode-3: Longest substring without repeated characters
C - XOR to all (binary topic)
Currently clicked button and current mouse coordinates in QT judgment interface
Leetcode heap correlation
5.Oracle-表空间