Created
March 20, 2014 10:03
-
-
Save huangyangme/9660659 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { margin: 0;padding: 0;background-color: #f3f3f3} | |
.box{ | |
margin: auto;position: absolute;top: 0;left: 0;right: 0;bottom: 0;/*绝对居中*/ | |
padding: 30px 40px; | |
width: 400px;height: 141px;background-color: #fff;box-shadow: 1px 1px 3px rgba(0,0,0,0.2); | |
} | |
.box:before, .box:after { | |
content: ''; | |
position: absolute; | |
z-index: -2; | |
bottom: 15px; | |
left: 20px; | |
width: 50%; | |
height: 20%; | |
border-radius: 10px/90px; | |
box-shadow: 0 15px 10px rgba(0,0,0,0.7); | |
-webkit-transform: rotate(-3deg); | |
-moz-transform: rotate(-3deg); | |
-ms-transform: rotate(-3deg); | |
-o-transform: rotate(-3deg); | |
transform: rotate(-3deg); | |
} | |
.box:after { | |
right: 20px; | |
left: auto; | |
-webkit-transform: rotate(3deg); | |
-moz-transform: rotate(3deg); | |
-ms-transform: rotate(3deg); | |
-o-transform: rotate(3deg); | |
transform: rotate(3deg); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="box"> | |
<img src="google.png" alt="google" width="400" height="141"> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment