当前位置:网站首页>About the loading of layer web spring layer components, the position of the layer is centered
About the loading of layer web spring layer components, the position of the layer is centered
2022-07-02 12:39:00 【Time chaser】
Recently, it has been used in projects layerui The corresponding prompt box and its loading layer , However, today, I encountered a magical problem , I use
var index = layer.load(0, {shade: false}); The result is always left and cannot be centered , I don't know why , Then center it by yourself
offset Set up top and left The offset position of
layer.load(0,{
offset: ['50%', "50%"], shade: false
});
Or is it :
var width = document.body.offsetWidth;
var wdithpx = (width / 2 - 37 / 2);
var index = layer.load(1, {
offset: ['50%', wdithpx], shade:false
});Finally, I want to recommend that you can understand layui This front end is out of the box Web frame , This is really good news for us back-end developers , And the style is also more atmospheric and beautiful ( explain : No advertising , I just think it's really suitable for us back-end staff ).
Layer Web Pop up layer component address :https://layer.layui.com/
Layui Front end frame address :https://www.layui.com/
边栏推荐
- 计数类DP AcWing 900. 整数划分
- The differences and relationships among port, targetport, nodeport and containerport in kubenetes
- Go learning notes - go based interprocess communication
- Intel 内部指令 --- AVX和AVX2学习笔记
- 记录一下MySql update会锁定哪些范围的数据
- Embedded Software Engineer career planning
- In development, why do you find someone who is paid more than you but doesn't write any code?
- SparkContext: Error initializing SparkContext解决方法
- Go学习笔记—多线程
- Mongodb redis differences
猜你喜欢

分布式机器学习框架与高维实时推荐系统
![[ybtoj advanced training guidance] cross the river [BFS]](/img/4e/83f14452ea6410768cdd01e725af2e.jpg)
[ybtoj advanced training guidance] cross the river [BFS]

Enhance network security of kubernetes with cilium

There is a hidden danger in CDH: the exchange memory used by the process of this role is XX megabytes. Warning threshold: 200 bytes

Docker-compose配置Mysql,Redis,MongoDB

Sort---
![[old horse of industrial control] detailed explanation of Siemens PLC TCP protocol](/img/13/9002244555ebe8a61660c2506993fa.png)
[old horse of industrial control] detailed explanation of Siemens PLC TCP protocol

bellman-ford AcWing 853. 有边数限制的最短路

Tas (file d'attente prioritaire)

MySQL indexes and transactions
随机推荐
Drools dynamically add, modify, and delete rules
Brush questions --- binary tree --2
[old horse of industrial control] detailed explanation of Siemens PLC TCP protocol
Redis transaction mechanism implementation process and principle, and use transaction mechanism to prevent inventory oversold
Distributed machine learning framework and high-dimensional real-time recommendation system
Why do programmers have the idea that code can run without moving? Is it poisonous? Or what?
哈希表 AcWing 841. 字符串哈希
分布式机器学习框架与高维实时推荐系统
Programmers can't find jobs after the age of 35? After reading this article, you may be able to find the answer
2.6 using recursion and stack - [tower of Hanoi problem]
Fastdateformat why thread safe
AI mid stage technology research
WSL 2 will not be installed yet? It's enough to read this article
趣味 面试题
What data types does redis have and their application scenarios
Is the neural network (pinn) with embedded physical knowledge a pit?
Redis introduction, scenario and data type
染色法判定二分图 AcWing 860. 染色法判定二分图
线性DP AcWing 902. 最短编辑距离
There is a hidden danger in CDH: the exchange memory used by the process of this role is XX megabytes. Warning threshold: 200 bytes