当前位置:网站首页>When absolutely positioned, the element is horizontally and vertically centered
When absolutely positioned, the element is horizontally and vertically centered
2022-07-03 17:11:00 【The pure land】
Assume that the length and width of the elements are 100px, There are two ways to center it horizontally and vertically
1.
.item{
position:absolute;
left:50%;
top:50%;
margin-left:-50px;/*100px Half of */
margin-top:-50px;/*100px Half of */
}
2.
.item{
position:absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin:auto;
}
边栏推荐
- Hands on in-depth learning notes (XIV) 3.7 Simple implementation of softmax regression
- LeetCode 1656. Design ordered flow
- [combinatorics] recursive equation (example 1 of recursive equation | list recursive equation)
- Open vsftpd port under iptables firewall
- The most complete postman interface test tutorial in the whole network, API interface test
- 匯編實例解析--實模式下屏幕顯示
- 深入理解 SQL 中的 Grouping Sets 语句
- LeetCode 1657. Determine whether the two strings are close
- [mathematical logic] equivalent calculus and reasoning calculus of propositional logic (propositional logic | equivalent calculus | principal conjunctive (disjunctive) paradigm | reasoning calculus)**
- C语言字符串反转
猜你喜欢

Redis:关于列表List类型数据的操作命令

CC2530 common registers for watchdog

Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard

29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)

【Try to Hack】主动侦查隐藏技术

ucore概述

线程池:业务代码最常用也最容易犯错的组件

CC2530 common registers for ADC single channel conversion

美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃
The way of wisdom (unity of knowledge and action)
随机推荐
SWM32系列教程4-端口映射及串口应用
Financial management (Higher Vocational College) financial management online Assignment 1 in autumn 20
新库上线 | CnOpenData中国保险机构网点全集数据
Dagong 21 autumn "power plant electrical part" online operation 1 [standard answer] power plant electrical part
Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard
One brush 148 force deduction hot question-5 longest palindrome substring (m)
MySQL Basics
RedHat 6.2 configuring ZABBIX
【JokerのZYNQ7020】DDS_ Compiler。
建立自己的网站(23)
LeetCode13.罗马数字转整数(三种解法)
执行脚本不认\r
[combinatorics] recursive equation (general solution structure of recursive equation with multiple roots | linear independent solution | general solution with multiple roots | solution example of recu
Static program analysis (I) -- Outline mind map and content introduction
kubernetes资源对象介绍及常用命令(四)
[try to hack] active detection and concealment technology
Leetcode13. Roman numeral to integer (three solutions)
New library online | cnopendata complete data of Chinese insurance institution outlets
Online assignment 3 of mobile Internet technology in the 20th autumn of electronic technology [standard answer]
[combinatorics] recursive equation (constant coefficient linear homogeneous recursive equation | constant coefficient, linear, homogeneous concept description | constant coefficient linear homogeneous