回到日志首页发送邮件给 i@amiku.cn直接在网站上留个言
当前位置: 阿米酷 | amiku.cn » 编程设计(实践和教程) » 文章正文

用CSS实现图片垂直居中的方法总收集

时间: 2009-02-01 / 分类: 编程设计(实践和教程) / 浏览次数: 人气指数:311 / 0个评论 发表评论

用CSS直接来实现图片的垂直居中似乎有点难度,但是好似又有很多种方法可以实现,参照来源Blueidea,收集如下:
第一种

Tips:You can change the code before run.

第二种:标准浏览器下另类方法

Tips:You can change the code before run.

第三种:标准浏览器严格型申明下

Tips:You can change the code before run.

第四种:利用字体大小的方法

Tips:You can change the code before run.

第五种:display:inline-block

Tips:You can change the code before run.

第六种:最简单当然是背景图片的方法拉

Tips:You can change the code before run.

第七种

Tips:You can change the code before run.

发表评论

您的昵称 *

您的邮箱 *

您的网站