当前位置:网站首页>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/
边栏推荐
- Deep Copy Event bus
- China traffic sign detection data set
- What data types does redis have and their application scenarios
- drools执行String规则或执行某个规则文件
- BOM DOM
- AI mid stage technology research
- Leetcode - Sword finger offer 51 Reverse pairs in an array
- Leetcode - < dynamic planning special> Jianzhi offer 19, 49, 60
- Drools executes string rules or executes a rule file
- Simple use of drools decision table
猜你喜欢
哈希表 AcWing 841. 字符串哈希
记录一下MySql update会锁定哪些范围的数据
计数类DP AcWing 900. 整数划分
[ybtoj advanced training guidance] cross the river [BFS]
async/await 异步函数
MySQL与PostgreSQL抓取慢sql的方法
"As a junior college student, I found out how difficult it is to counter attack after graduation."
线性DP AcWing 899. 编辑距离
ThreadLocal的简单理解
Mysql database foundation
随机推荐
线性DP AcWing 902. 最短编辑距离
浏览器node事件循环
深拷贝 事件总线
Brush questions --- binary tree --2
Error in kubeadm join: [error port-10250]: port 10250 is in use [error fileavailable--etc kubernetes PKI
哈希表 AcWing 840. 模拟散列表
堆 AcWing 839. 模拟堆
Find the factorial of a positive integer within 16, that is, the class of n (0= < n < =16). Enter 1111 to exit.
arcgis js 4. Add pictures to x map
怎样写一篇赏心悦目的英文数学论文
SparkContext: Error initializing SparkContext解决方法
AI mid stage technology research
AI中台技术调研
接口测试面试题目,你都会了吗?
[I'm a mound pytorch tutorial] learning notes
Embedded Software Engineer career planning
drools决策表的简单使用
通过反射执行任意类的任意方法
寻找二叉树中任意两个数的公共祖先
Enhance network security of kubernetes with cilium