当前位置:网站首页>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>
边栏推荐
- Find the combination number acwing 888 Find the combination number IV
- Regulations for network security events of vocational group in 2022 Guizhou Vocational College skill competition
- Dataframe (1): introduction and creation of dataframe
- 20220213-CTF MISC-a_ good_ Idea (use of stegsolve tool) -2017_ Dating_ in_ Singapore
- RecyclerView的应用
- NotImplementedError: Cannot convert a symbolic Tensor (yolo_boxes_0/meshgrid/Size_1:0) to a numpy ar
- 5. Oracle TABLESPACE
- 中国剩余定理 AcWing 204. 表达整数的奇怪方式
- MySQL advanced part 1: stored procedures and functions
- MySQL advanced part 2: SQL optimization
猜你喜欢

2.Oracle-数据文件的添加及管理

There are three kinds of SQL connections: internal connection, external connection and cross connection

Series of how MySQL works (VIII) 14 figures explain the atomicity of MySQL transactions and the principle of undo logging

Alibaba established the enterprise digital intelligence service company "Lingyang" to focus on enterprise digital growth

MySQL advanced part 1: stored procedures and functions

5. Oracle TABLESPACE

Design specification for mobile folding screen

Bash exercise 17 writing scripts to install the server side of FRP reverse proxy software

Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022
![[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian](/img/f1/e7a8a1a31bc5712d9f32d91305a2b0.jpg)
[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
随机推荐
P2575 master fight
H5 模块悬浮拖动效果
Game theory acwing 893 Set Nim game
C - XOR to all (binary topic)
Record the process of configuring nccl and horovod in these two days (original)
微信小程序路由再次跳转不触发onload
MySQL advanced part 1: index
Alibaba's new member "Lingyang" officially appeared, led by Peng Xinyu, Alibaba's vice president, and assembled a number of core department technical teams
论文阅读报告
高斯消元 AcWing 884. 高斯消元解异或線性方程組
2022/6/29-日报
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
2021apmcm post game Summary - edge detection
博弈论 AcWing 891. Nim游戏
[learning] database: MySQL query conditions have functions that lead to index failure. Establish functional indexes
Daily question 1189 Maximum number of "balloons"
时间很快,请多做有意义的事情
ADG5412FBRUZ-RL7应用 双电源模拟开关和多路复用器IC
Inclusion exclusion principle acwing 890 Divisible number
[2021]GIRAFFE: Representing Scenes as Compositional Generative Neural Feature Fields