当前位置:网站首页>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>
边栏推荐
- MySQL advanced part 2: optimizing SQL steps
- 阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长
- Traversal of leetcode tree
- ollvm编译出现的问题纪录
- 安装OpenCV--conda建立虚拟环境并在jupyter中添加此环境的kernel
- [2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
- 什么是套接字?Socket基本介绍
- Chart. JS - Format Y axis - chart js - Formatting Y axis
- 博弈论 AcWing 894. 拆分-Nim游戏
- Leetcode divide and conquer / dichotomy
猜你喜欢

MPLS experiment

Paper reading report
![[moviepy] unable to find a solution for exe](/img/0a/4841f53cedc1333654b9443e406f4c.jpg)
[moviepy] unable to find a solution for exe

2021apmcm post game Summary - edge detection

Find the combination number acwing 888 Find the combination number IV

阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长

Design specification for mobile folding screen

Leetcode stack related

Bit of MySQL_ OR、BIT_ Count function

5. Oracle tablespace
随机推荐
Install opencv -- CONDA to establish a virtual environment and add the kernel of this environment in jupyter
Winter messenger 2
RecyclerView的应用
ollvm编译出现的问题纪录
什么是套接字?Socket基本介绍
Leetcode-9: palindromes
Interval problem acwing 906 Interval grouping
One question per day 1020 Number of enclaves
[leetcode] day95 effective Sudoku & matrix zeroing
时间很快,请多做有意义的事情
Leetcode-31: next spread
Redis-02.Redis命令
MySQL advanced part 1: index
3. Oracle control file management
1.14 - assembly line
Stack acwing 3302 Expression evaluation
5. Oracle TABLESPACE
LeetCode 0107. Sequence traversal of binary tree II - another method
Vant Weapp SwipeCell设置多个按钮
Single chip computer engineering experience - layered idea