Created
May 15, 2013 10:27
-
-
Save Geokoumpa/5583027 to your computer and use it in GitHub Desktop.
A CodePen by hoffmanjeff. Apple's border-radius shadow
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
<aside class="promos"> | |
<ul> | |
<li class="first-child"><div class="curve-down"> | |
<a class="promo1" href="/ipad/" style="display: none;" onclick="s_objectID="http://www.apple.com/ipad/_2";return this.s_oc?this.s_oc(e):true"><img src="http://images.apple.com/home/images/promo_ipad.png" alt="iPad. Two sizes do all." width="237" height="185"></a> | |
<a class="promo1" href="/iphone/" style="" onclick="s_objectID="http://www.apple.com/iphone/_2";return this.s_oc?this.s_oc(e):true"><img src="http://images.apple.com/home/images/promo_iphone5.png" alt="iPhone 5. Loving it is easy. That’s why so many people do." width="237" height="185"></a> | |
</div></li> | |
<li class="second-child"><div class="curve-down"> | |
<a class="promo2" href="/iphone/videos/#tv-ads-photos-every-day" onclick="s_objectID="http://www.apple.com/iphone/videos/#tv-ads-photos-every-day_1";return this.s_oc?this.s_oc(e):true"><img src="http://images.apple.com/home/images/promo_iphone_ad_photoseveryday.png" alt="Watch the new iPhone TV ad.”" width="237" height="185"><span class="play"></span></a> | |
</div></li> | |
<li class="third-child"><div class="curve-down"> | |
<a class="promo3" href="/imac/" onclick="s_objectID="http://www.apple.com/imac/_1";return this.s_oc?this.s_oc(e):true"><img src="http://images.apple.com/home/images/promo_imac.png" alt="iMac. Performance and design. Taken right to the edge." width="237" height="185"></a> | |
</div></li> | |
<li class="last-child"><div class="curve-down"> | |
<a class="promo4" href="https://developer.apple.com/wwdc/" onclick="s_objectID="https://developer.apple.com/wwdc/_1";return this.s_oc?this.s_oc(e):true"><img src="http://images.apple.com/home/images/promo_wwdc.png" alt="WWDC 2013. June 10-14 in San Francisco." width="237" height="185"></a> | |
</div></li> | |
</ul> | |
</aside> |
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
ul { | |
list-style: none outside; | |
} | |
.promos ul { | |
clear: both; | |
width: 982px; | |
padding-bottom: 50px; | |
zoom: 1; | |
} | |
.promos ul li.first-child { | |
margin-left: 0; | |
} | |
.promos ul li { | |
display: inline; | |
float: left; | |
position: relative; | |
z-index: 1; | |
width: 237px; | |
height: 185px; | |
margin-left: 11px; | |
_margin-left: 9px; | |
border-top: 1px solid #f2f2f2; | |
-webkit-box-shadow: rgba(0,0,0,.15) 0 1px 3px; | |
-moz-box-shadow: rgba(0,0,0,.15) 0 1px 3px; | |
box-shadow: rgba(0,0,0,.15) 0 1px 3px; | |
box-shadow: rgba(0,0,0,.15) 0 1px 6px url(0/IE9); | |
-webkit-border-radius: 5px; | |
-moz-border-radius: 5px; | |
border-radius: 5px; | |
} | |
.promos ul li .curve-down:nth-child(1n) { | |
border: none; | |
-webkit-border-radius: 100% / 33px; | |
-moz-border-radius: 100% / 33px; | |
border-radius: 100% / 33px; | |
-webkit-box-shadow: 0 8px 3px -5px rgba(0,0,0,.2); | |
-moz-box-shadow: 0 8px 3px -5px rgba(0,0,0,.2); | |
box-shadow: 0 8px 3px -5px rgba(0,0,0,.2); | |
} | |
.promos ul li .curve-down { | |
display: inline-block; | |
height: 185px; | |
width: 100%; | |
_display: inline; | |
_zoom: 1; | |
border: 1px solid #e0e0e0; | |
border-top-color: #efefef; | |
border-bottom-color: #ccc; | |
} | |
.promos ul li a:nth-child(1n) { | |
border-color: #fff; | |
} | |
.promos .promo2, .promos .promo1 { | |
position: absolute; | |
z-index: 1; | |
} | |
.promos ul li a { | |
display: block; | |
cursor: pointer; | |
background: #f6f6f6; | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(50%, rgba(249,249,249,1)), color-stop(100%, rgba(240,240,240,1))); | |
background: -webkit-linear-gradient(top, rgba(249,249,249,1) 50%, rgba(240,240,240,1) 100%); | |
background: -moz-linear-gradient(top, rgba(249,249,249,1) 50%, rgba(240,240,240,1) 100%); | |
background: -ms-linear-gradient(top, rgba(249,249,249,1) 50%, rgba(240,240,240,1) 100%); | |
background: -o-linear-gradient(top, rgba(249,249,249,1) 50%, rgba(240,240,240,1) 100%); | |
background: linear-gradient(top, rgba(249,249,249,1) 50%, rgba(240,240,240,1) 100%); | |
-webkit-border-radius: 5px; | |
-moz-border-radius: 5px; | |
border-radius: 5px; | |
-webkit-box-shadow: 0 -3px 1px rgba(255,255,255,.6), inset 0 2px 1px rgba(255,255,255,.97), 0 0 3px -1px rgba(0,0,0,.7); | |
-moz-box-shadow: 0 -3px 1px rgba(255,255,255,.6), inset 0 2px 1px rgba(255,255,255,.97), 0 0 3px -1px rgba(0,0,0,.7); | |
box-shadow: 0 -3px 1px rgba(255,255,255,.6), inset 0 2px 1px rgba(255,255,255,.97), 0 0 3px -1px rgba(0,0,0,.7); | |
} | |
.promos ul li a img { | |
display: block; | |
-webkit-border-radius: 5px; | |
-moz-border-radius: 5px; | |
border-radius: 5px; | |
} | |
img { | |
border: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment