当前位置:网站首页>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 :

边栏推荐
- [teacher zhaoyuqiang] use the Oracle tracking file
- [ACNOI2022]做过也不会
- Coordinate transformation of graphic technology
- 2022 PMP project management examination agile knowledge points (1)
- Easyplayerpro win configuration full screen mode can not be full screen why
- The applet reads more than 20 data, and the cloud function reads more than 100 restrictions
- 根据网络上的视频的m3u8文件通过ffmpeg进行合成视频
- Synchronous FIFO
- SQL intra statement operation
- You get in Anaconda
猜你喜欢

Future trends in automated testing

WCF TCP protocol transmission

2022年制冷与空调设备运行操作上岗证题库及模拟考试

The first exposure of Alibaba cloud's native security panorama behind the only highest level in the whole domain

Graphmae - - lecture rapide des documents

Swift 基础 闭包/Block的使用(源码)
![Leetcode 515 find the leetcode path of the maximum [bfs binary tree] heroding in each row](/img/16/011ba3aef1315c39526daac7e3ec89.png)
Leetcode 515 find the leetcode path of the maximum [bfs binary tree] heroding in each row

Search and recommend those things

Swift Extension ChainLayout(UI的链式布局)(源码)

Understanding of the concept of "quality"
随机推荐
2022年制冷与空调设备运行操作上岗证题库及模拟考试
Blue Bridge Cup_ Queen n problem
Learning event binding of 3D visualization from scratch
Swift Extension NetworkUtil(網絡監聽)(源碼)
dhcp、tftp基础
js滚动div滚动条到底部
Screenshot recommendation - snipaste
OpenCV get(propId) 常用的值
不止于观测|阿里云可观测套件正式发布
Swift 基礎 閉包/Block的使用(源碼)
2021-03-11 COMP9021第八节课笔记
More appropriate development mode under epidemic situation
有关iframe锚点,锚点出现上下偏移,锚点出现页面显示问题.iframe的srcdoc问题
More than observation | Alibaba cloud observable suite officially released
51单片机_外部中断 与 定时/计数器中断
问题3 — messageBox弹框,修改默认背景色
UTC、GMT、CST
软件过程与项目管理期末复习与重点
VsCode主题推荐
【毕业季】你好陌生人,这是一封粉色信笺