Skip to content

Instantly share code, notes, and snippets.

@markpasc
Created October 8, 2010 18:58
Show Gist options
  • Save markpasc/617330 to your computer and use it in GitHub Desktop.
Save markpasc/617330 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<title>Background border-radius fringing example</title>
<style type="text/css">
/* 960.gs reset.css */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
/* 960.gs text.css */
body{font:13px/1.5 'Helvetica Neue',Arial,'Liberation Sans',FreeSans,sans-serif}a:focus{outline:1px dotted}hr{border:0 #ccc solid;border-top-width:1px;clear:both;height:0}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}ul{list-style:disc}li{margin-left:30px}p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset{margin-bottom:20px}
/* real styles */
body {
background: #eee;
}
.item {
position: relative;
width: 700px;
margin: 60px auto;
background: #b8c073 url(http://s.twimg.com/a/1285870286/images/themes/theme6/bg.gif) no-repeat;
}
.item .author {
position: absolute;
top: 20px;
left: -50px;
border: 5px solid white;
border-width: 5px 5px 10px 5px;
line-height: 0;
-webkit-box-shadow: 0 0 4px #666;
-moz-box-shadow: 0 0 4px #666;
box-shadow: 0 0 4px #666;
-webkit-transform: rotate(3.39227220466deg);
-moz-transform: rotate(3.39227220466deg);
transform: rotate(3.39227220466deg);
}
.item .status-shade {
padding: 20px;
background: rgba(255, 255, 255, 0.8);
}
.item .status {
padding: 20px;
background: white;
border-radius: 20px;
-moz-border-radius: 20px;
}
.item .summary {
margin: 0 0 1em;
font-size: 1.5em;
line-height: 1.5em;
}
/*
* border-radiuses for the boxes with backgrounds
*/
#two.item,
#three.item, #three .status-shade {
border-radius: 20px;
-moz-border-radius: 20px;
}
</style>
</head><body>
<div id="one" class="item">
<a class="author" href="http://twitter.com/markpasc"><img src="http://a3.twimg.com/profile_images/1094090023/headface_normal.jpg" width="48" height="48"></a>
<div class="status-shade">
<div class="status">
<p class="summary">@<a href="http://twitter.com/jeremyleeking">jeremyleeking</a> i did add border-radius to the inner element, but its background is translucent so together it has bad pixel fringing</p>
<div class="footer">
<a href="http://twitter.com/markpasc/status/26696884392" class="relativedatestamp" title="Thu Oct 07 16:46:05 +0000 2010">07 Oct 2010 4:46 <small>PM</small></a>
by
<a href="http://twitter.com/markpasc">Mark Paschal</a>
</div>
</div>
</div>
</div>
<div id="two" class="item">
<a class="author" href="http://twitter.com/markpasc"><img src="http://a3.twimg.com/profile_images/1094090023/headface_normal.jpg" width="48" height="48"></a>
<div class="status-shade">
<div class="status">
<p class="summary">@<a href="http://twitter.com/jeremyleeking">jeremyleeking</a> i did add border-radius to the inner element, but its background is translucent so together it has bad pixel fringing</p>
<div class="footer">
<a href="http://twitter.com/markpasc/status/26696884392" class="relativedatestamp" title="Thu Oct 07 16:46:05 +0000 2010">07 Oct 2010 4:46 <small>PM</small></a>
by
<a href="http://twitter.com/markpasc">Mark Paschal</a>
</div>
</div>
</div>
</div>
<div id="three" class="item">
<a class="author" href="http://twitter.com/markpasc"><img src="http://a3.twimg.com/profile_images/1094090023/headface_normal.jpg" width="48" height="48"></a>
<div class="status-shade">
<div class="status">
<p class="summary">@<a href="http://twitter.com/jeremyleeking">jeremyleeking</a> i did add border-radius to the inner element, but its background is translucent so together it has bad pixel fringing</p>
<div class="footer">
<a href="http://twitter.com/markpasc/status/26696884392" class="relativedatestamp" title="Thu Oct 07 16:46:05 +0000 2010">07 Oct 2010 4:46 <small>PM</small></a>
by
<a href="http://twitter.com/markpasc">Mark Paschal</a>
</div>
</div>
</div>
</div>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment