当前位置:网站首页>Positioning setting horizontal and vertical center (multiple methods)
Positioning setting horizontal and vertical center (multiple methods)
2022-06-26 05:20:00 【AAA.. AA】
Method 1 :flex
Set in parent box :
display : flex;
align-items: center;
justify-content: center;
Method 2 : float
The son is the father
left :50%
top :50%
transfrom: transletter(-50%,-50%)
Method 3 :
Horizontal center (text-align): center
Vertical center (line-height): Same height as the current block
边栏推荐
- cartographer_fast_correlative_scan_matcher_2d分支定界粗匹配
- Codeforces Round #802 (Div. 2)(A-D)
- The best Chinese open source class of vision transformer, ten hours of on-site coding to play with the popular model of Vit!
- Thoughts triggered by the fact that app applications are installed on mobile phones and do not display icons
- How to ensure the efficiency and real-time of pushing large-scale group messages in mobile IM?
- Install the tp6.0 framework under windows, picture and text. Thinkphp6.0 installation tutorial
- LeetCode 19. Delete the penultimate node of the linked list
- Windows下安装Tp6.0框架,图文。Thinkphp6.0安装教程
- [unity3d] rigid body component
- 程序人生
猜你喜欢
[unity3d] collider assembly
Transport layer TCP protocol and UDP protocol
6.1 - 6.2 introduction to public key cryptography
Install the tp6.0 framework under windows, picture and text. Thinkphp6.0 installation tutorial
Fedora alicloud source
Why does the mobile IM based on TCP still need to keep the heartbeat alive?
Guanghetong and anti international bring 5g R16 powerful performance to the AI edge computing platform based on NVIDIA Jetson Xavier nx
PHP二维/多维数组按照指定的键值来进行升序和降序
Status of processes and communication between processes
关于支付接口回调地址参数字段是“notify_url”,签名过后的特殊字符url编码以后再解码后出现错误(¬ , ¢, ¤, £)
随机推荐
Leetcode114. 二叉树展开为链表
How to ensure the efficiency and real-time of pushing large-scale group messages in mobile IM?
Yunqi lab recommends experience scenarios this week, free cloud learning
cartographer_ optimization_ problem_ 2d
6.1 - 6.2 introduction to public key cryptography
[greedy college] recommended system engineer training plan
What is UWB in ultra-high precision positioning system
程序人生
LeetCode_二叉搜索树_简单_108.将有序数组转换为二叉搜索树
Tp5.0 framework PDO connection MySQL error: too many connections solution
Collections and dictionaries
Setting pseudo static under fastadmin Apache
Introduction to GUI programming to game practice (II)
UWB ultra high precision positioning system architecture
【ARM】讯为rk3568开发板buildroot添加桌面应用
Leetcode513.找出树的左下角的值
Apktool tool usage document
Guanghetong and anti international bring 5g R16 powerful performance to the AI edge computing platform based on NVIDIA Jetson Xavier nx
PHP二维/多维数组按照指定的键值来进行升序和降序
PHP one sentence Trojan horse