为什么我背面side-back的大小和side-front大小不一样啊?
<!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>无标题文档</title>
<style type="text/css">
ody,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fileset,table,td,img,div,dl,dt,dd,input{margin:0;padding:0;}
body{font-size:12px;}
img{border:none;}
li{list-style:none;}
input,select,textarea{outline:none;}
textarea{resize:none;}
a{text-decoration:none;}
/*清浮动*/
.clearfix:after{content:"";display:block;clear:both;}
.clearfix{zoom:1;}
*{padding: 0;margin:0;}/*所有元素padding和margin都设为0*/
body{
background-color:#fff;
color:#555;
font-family:'Avenir Next','Lantinghei SC';/*中文为兰亭雅黑*/
font-size:14px;
-webkit-font-smoothing:antialisase;/*字体平滑*/
}
.wrap{
width:100%;
height:600px;
position:absolute; /*设置居中*/
top:50%; /*设置居中*/
margin-top:-300px;/*设置居中*/
background-color:#333;
overflow:hidden;/*超出div.wrap的照片就不显示了*/
/*海报样式*/
-webkit-perspective:800px;/*为了透视3D旋转*/
}
.photo{
width:260px;
height:320px;
position:absolute;
z-index:1;
box-shadow:0 0 1px rgba(0,0,0,.01);/*因为是随机定位的,要用到left和top*/
}
.photo.side{
width:100%;/*正面和反面*/
height:100%;
background-color:red;
position:absolute;/*为了漂浮起来*/
top:0;
right:0;
padding:20px;
box-sizing:border-box;/*内容和padding都不会超过边框*/
}
.photo .side-front{}/*正面*/
.photo .side-front.image{
width:100%;
height:250px;
line-height:250px;/*当里面的图片标签不足250px会垂直居中*/
overflow:hidden;/*超过部分会隐藏*/
}
.photo .side-front .image img{
width:100%;
}
.photo .side-front .caption{
text-align:center;
font-size:16px;
line-height:50px;}
.photo .side-back{}
.photo .side-back .desc{
width:100%;
height:100%;
color:#666;
font-size:14px;
line-height:1.5em;
}
.photo_center{
left:50%;
top:50%;/*设置水平居中*/
margin:-160px 0 0 -130px;
z-index:999;/*保证不会被遮挡*/
}
.photo-wrap{
position:absolute
width:100%;
height:100%
-webkit-transform-style:preserve-3d;
}
.photo-wrap .side-front{
-webkit-transform:translateY(0deg);
}
.photo-wrap .side-back{
-webkit-transform:translateY(180deg);
}
.photo-wrap .side{
-webkit-backface-visibility:hidden
}
.photo_front .photo-wrap{
-webkit-transform:translateY(0deg);
}
.photo_back .photo-wrap{
-webkit-transform:translateY(180deg);
}
</style>
</head>
<body onselectstart="return false;">
<div class="wrap">
<div class="photo photo_center"><!--负责平面旋转-->
<div clas="photo-wrap"><!--负责3D旋转-->
<div class="side side-front">
<p class="image"><img src="images\test.jpg"/> </p>
<p class="caption"> 麦兜</p>
</div>
<div class ="side side-back">
<p class="desc">描述信息</p>
</div>
</div>
</div>
</div>
</body>
</html>