css3,实现照片墙展示效果

慢慢的靠近css3,享受它给我们的生活带来的魅力。今天将简单的用css3实现一个照片墙效果。


css3

*{margin: 0;padding: 0;}
body {background:#eee;}
img{border: none;}
.container{width: 1200px;
	height: 500px;
	margin: 100px auto;
	position: relative;
}
.container img{
	width: 245px;
	padding: 10px 10px 15px;
	border: 1px solid #ddd;
	background: #fff;
	position: absolute;
	transition:1s;
	-webkit-transition:1s;
	-moz-transition:1s;
}
.container img:hover{
	transform:rotate(0deg);
	-webkit-transform:rotate(0deg);
	-moz-transform:rotate(0deg);
	transform:scale(1.2);
	-wenkit-transform:scale(1.2);
	-moz-transform:scale(1.2);
	box-shadow: 10px 10px 15px #ccc;
	z-index: 99;
}
.img01{
	left: 0;
	top: 0px;
	transform:rotate(15deg);
	-webkit-transform:rotate(15deg);
	-moz-transform:rotate(15deg);
	z-index: 0;
}
.img02{
	left: 150px;
	top: 150px;
	transform:rotate(-10deg);
	-webkit-transform:rotate(-10deg);
	-moz-transform:rotate(-10deg);
	z-index: 2;
}
.img03{
	left: 300px;
	top: 30px;	
	transform:rotate(-30deg);
	-webkit-transform:rotate(-30deg);
	-moz-transform:rotate(-30deg);
	z-index: 3;
}
.img04{
	left: 500px;
	top: 50px;
	transform:rotate(15deg);
	-webkit-transform:rotate(15deg);
	-moz-transform:rotate(15deg);
	z-index: 4;
}
源代码下载地址:


你可能感兴趣的:(css3,实现照片墙展示效果)