CSS div水平垂直居中和div置于底部
2016-06-23 10:21
603 查看
一、水平居中
二、水平垂直居中
<div class="content"></div>
三、div置于底部(footer)
来自:http://blog.csdn.net/sykent/article/details/7791284
.hor_center { margin: 0 auto; }
二、水平垂直居中
<div class="content"></div>
.content { width: 360px; height: 240px; } .ver_hor_center { position: absolute; top: 50%; left: 50%; margin-left: -180px; /*要居中的div的宽度的一半*/ margin-top: -120px; /*要居中的div的高度的一半*/ }
三、div置于底部(footer)
.bottom_footer { position: fixed; /*or前面的是absolute就可以用*/ bottom: 0px; }
来自:http://blog.csdn.net/sykent/article/details/7791284
相关文章推荐
- CSS高级
- css px 和 % ,em 等混合计算宽度或者高度
- HSSFWorkbook 设计Excel样式
- CSS 样式异步加载
- 外部JS文件调用外部的Css文件
- 值和单位
- Table在DIV中以滚动条方式显示
- 清除浮动——clearfix
- 如何把Button按钮样式换成ImageButton?
- 简单重写类型为radio的input元素样式
- 用CSS设置当鼠标移动到图片内时显示文字
- 使用CSS3滤镜让图片反转颜色
- JQ 特效下拉列表 写出与css一样的效果
- CSS外部样式表+伪选择器
- css居中方法详解
- body css样式中 设置宽度和背景色
- body css样式中 设置宽度和背景色
- body css样式中 设置宽度和背景色
- body css样式中 设置宽度和背景色
- body css样式中 设置宽度和背景色