当前位置:网站首页>Question 3 - MessageBox pop-up box, modify the default background color
Question 3 - MessageBox pop-up box, modify the default background color
2022-06-24 08:18:00 【Wine tripod】
Project scenario :
PC End development ,vue + elementUI,
The source code section
MessageBox.confirm(`${
message ? message : ' Whether or not to continue ?'}`, ' Tips ', {
confirmButtonText: ' determine ',
cancelButtonText: ' Cancel ',
type: 'warning'
}).then(() => {
})
Problem description
Show MessageBox bounced , In some cases , Bullet frame background color ( mask ) It's all black .

Cause analysis :
Maybe it's in addition to elementUI Style source code Set the background color of , The background color of the pop-up box is also set somewhere in the project ,2 Caused by overlapping .
Solution :
- Find the tag of the bullet box class name . Specific steps ( Take Firefox as an example ): Display a pop-up box on the page , open F12( Console ), Check the pop-up tab , Copy the... Of the selected element class name (
el-message-box__wrapper); - In common components 、 style ( It is recommended to put it in public documents ) Redefine the background color in the file ,rgba Values can be modified according to business requirements .
Be careful: Must be attached without scoped Of style In the label .
.el-message-box__wrapper{
background-color: rgba(0, 0, 0, 0.4);
}
- If you need to define the background color , It can not affect other styles of this page , It can be like this :
/* Page other styles */
<style scoped> .pagination-wrap {
display: flex;
flex-direction: row-reverse;
}
</style>
/* Defines the background color css */
<style> .el-message-box__wrapper{
background-color: rgba(0, 0, 0, 0.8);
}
</style>
Realization effect :

边栏推荐
- Transformers pretrainedtokenizer class
- Easyplayerpro win configuration full screen mode can not be full screen why
- Getting started with ffmpeg
- Catégorie de prêt 5
- Markdown 实现文内链接跳转
- JDBC 在性能测试中的应用
- 5g industrial router Gigabit high speed low delay
- Graphmae ---- quick reading of papers
- Solve the problem of notebook keyboard disabling failure
- Teach you how to use the reflect package to parse the structure of go - step 1: parameter type check
猜你喜欢

OC extension detects whether an app is installed on the mobile phone (source code)

Utilisation de la fermeture / bloc de base SWIFT (source)

Examples of corpus data processing cases (reading multiple text files, reading multiple files specified under a folder, decoding errors, reading multiple subfolder text, batch renaming of multiple fil

Markdown 实现文内链接跳转

自动化测试的未来趋势

根据网络上的视频的m3u8文件通过ffmpeg进行合成视频

蓝桥杯_N 皇后问题

Signature analysis of app x-zse-96 in a Q & a community

Future trends in automated testing

Shader common functions
随机推荐
Swift Extension ChainLayout(UI的链式布局)(源码)
VR is destined to reappear in the Jianghu?
Robot acceleration level task priority inverse kinematics
Pagoda panel installation php7.2 installation phalcon3.3.2
11--无重复字符的最长子串
June 27, 2021: given a positive array arr, it represents the weight of several people
All you know is the test pyramid?
Coordinate transformation of graphic technology
UTC、GMT、CST
For a detailed explanation of flex:1, flex:1
How to use the virtual clock of FPGA?
贷款五级分类
貸款五級分類
MAYA重新拓布
疫情下更合适的开发模式
Introduction to software engineering - Chapter 2 - feasibility study
More than observation | Alibaba cloud observable suite officially released
VsCode主题推荐
2021-03-11 COMP9021第八节课笔记
Swift Extension NetworkUtil(网络监听)(源码)