博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CSS水平垂直(上下左右)居中的三种方法
阅读量:3906 次
发布时间:2019-05-23

本文共 624 字,大约阅读时间需要 2 分钟。

/* div上下左右居中的三种方法 */            /* 1 */                  position: absolute;            left: 50%;            top:50%;            transform: translate(-50%,-50%);            border: orangered 1px solid;                  /* 2 */                     width: 160px;            height: 126px;            position: absolute;            left: 0;            top: 0;            bottom: 0;            right: 0;            margin:auto;            border: orangered 1px solid;                  /*3*/            position: absolute;            left: 50%;            top: 50%;            margin-left: -200px;            margin-top: -200px;

 

转载地址:http://dvqen.baihongyu.com/

你可能感兴趣的文章
python 切片
查看>>
interview sum
查看>>
HTTPs Control
查看>>
Prenatal Vitamin Brands
查看>>
Python sort list customisation
查看>>
Python sort dict by value
查看>>
ASCII - American Standard Code for Information Interchange
查看>>
Django short url
查看>>
Tech Blog
查看>>
Logon System Design
查看>>
Python yield
查看>>
Sina API OAuth
查看>>
Python supervisor
查看>>
dict & set
查看>>
Common Multiple and Least Common Multiple(LCM)
查看>>
大数据处理
查看>>
Difference Between Hard & Soft Links
查看>>
Linux Hard link and Symbolic link
查看>>
redis brief intro
查看>>
mongo db brief intro
查看>>