完美DIV、图片水平垂直居中
2015-09-07 09:17
295 查看
完美DIV、图片水平垂直居中
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>完美DIV、图片水平垂直居中</title> <style type="text/css"> .Absolute-Center { margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; text-align:center; display:table; width:100%; height:auto; } .Absolute-Center>img{width:300px; height: 200px;} </style> </head> <body> <div class="Absolute-Center"> <img src="http://a3.att.hudong.com/36/08/14300001018588128693081766255.jpg"> </div> </body> </html>
演示地址:http://www.mcdnf.com/demo/css/center.html
相关文章推荐
- 按右键另存图片只能存BMP
- photoshop去除图片上的水印
- upload上传单张图片
- 图片引发的溢出危机(图)
- VB的TextBox文本框实现垂直居中显示的方法
- C#实现把彩色图片灰度化代码分享
- C#将图片和字节流互相转换并显示到页面上
- C#监控文件夹并自动给图片文件打水印的方法
- 在IE与FF中如何居中的css写法
- 纯CSS实现上下左右都居中的代码
- 纯CSS实现的当鼠标移上图片添加阴影效果代码
- C#实现打开画图的同时载入图片、最大化显示画图窗体的方法
- 随鼠标移动的图片或文字特效代码
- CSS 图片横向排列实现代码
- C#实现将Email地址转成图片显示的方法
- 超级经典一套鼠标控制左右滚动图片带自动翻滚
- 用css实现图片垂直居中的使用技巧
- C++实现读取图片长度和宽度
- PHP根据图片色界在不同位置加水印的方法
- 对象存储服务与图片服务器的优缺点对比