您的位置:首页 > Web前端 > CSS

纯css实现超宽图片全屏居中(兼容淘宝店铺)

2015-03-11 16:56 330 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>纯css实现超宽图片全屏居中(兼容淘宝店铺)</title>
<meta name="author" content="艺灵设计,yilingsj@gmail.com, www.yilingsj.com" />
<style type="text/css">
*{margin:0; padding:0;}
body{overflow:hidden;}
a img{border:none;}
a{display:inline-block;}
.qp{width:1920px; margin-left:-960px;position:absolute;left:50%;text-align:center}
</style>
</head>
<body>
<div style="height:598px;">
 <div class="qp">
  <a href="http://www.yilingsj.com"><img src="http://img03.taobaocdn.com/imgextra/i3/1758846006/T2yh8FXwJaXXXXXXXX_!!1758846006.jpg" /></a>
 </div>
</div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  div css html5