wrap .box{

width: 200px;
height:200px;
background: pink;

// 方案1
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
margin: auto;

//方案2
position:absolute;
top:50%;
left:50%;
transfrom:translate(-50%,-50%);
}

//方案3

wrap{

width:500px;
height: 500px;
background: gray;

display: flex;
justify-content: center; // 主轴水平居中
align-items: center; // 侧轴居中
}

最新文章

  1. 设计模式01观察者模式(java)
  2. 关于SQL Server 2008添加用户映射问题 解决办法
  3. Yii 验证码验证
  4. Web.config配置文件详解(新手必看)
  5. Redis学习手册
  6. 百万级数据mysql分区
  7. QVM 实操记 - 18.12.28
  8. 数学基础IV 欧拉函数 Miller Rabin Pollard's rho 欧拉定理 行列式
  9. 用递归方法判断字符串是否是回文(Recursion Palindrome Python)
  10. Programming Specification
  11. Django集成Markdown编辑器【附源码】
  12. Screen、IP
  13. python 爬虫--同花顺-使用代理
  14. mybatis之关联(2)
  15. Ultraedit使用小技巧
  16. 查看eclipse版本信息
  17. pandas 处理数据中NaN数据
  18. Extjs加载本地的一个json文件
  19. Google’s Project Tango is shutting down because ARCore is already here
  20. 鼠标指向表格时 显示更多信息 toolTipController1

热门文章

  1. 从FreeBSD里面看到的网络协议列表,感觉可以保存一下
  2. 图片查看器(类似于QQ,另外又加了JARA的下方的图片缩略导航图)
  3. elasticsearch relevance score相关性评分的计算
  4. 使用await写异步优化代码
  5. centos 搭建本地YUM源并使用apache共享YUM源
  6. mysql基于Altas读写分离并实现高可用
  7. Linux系统测试端口连通性的方法
  8. 函数传递是如何让HTTP服务器工作的
  9. python读写excel(xlrd、xlwt)
  10. webpack第一节(4)