Skip to content

Instantly share code, notes, and snippets.

@zincplusplus
Created December 21, 2011 12:56
Show Gist options
  • Save zincplusplus/1505949 to your computer and use it in GitHub Desktop.
Save zincplusplus/1505949 to your computer and use it in GitHub Desktop.
Merry Christmass Newsletter Template
/**
* Merry Christmass Newsletter Template
**/
body {
background: linear-gradient(27deg, transparent 48%, rgba(0,0,0,0.5) 48%, transparent 49%),
linear-gradient(-27deg, transparent 48%, rgba(0,0,0,0.5) 48%, transparent 49%);
background-size: 20px 40px;
background-color: #00906f;
height: 100%;
padding: 0;
margin: 0;
}
#xmas {
color: #fff;
font-family: "Rockwell", Arial, serif;
height: 300px;
margin: 0 auto;
width: 600px;
}
#xmas .xribbon {
position: relative;
top: 90px;
text-align: center;
}
#xmas h1 {
display: inline-block;
margin: 0 45px;
position: relative;
top:5px;
}
#xmas .xfold,
#xmas .xfold:after,
#xmas h1 .xtitle {
border: 1px dashed #fc0;
border-left: 0 none;
border-right: 0 none;
box-shadow: 0 -1px 0 #e30404,/* outline top */
0 1px 0 #e30404;/* outline bottom */
}
#xmas h1 .xtitle
{
background-color: #e30404;
background-image: linear-gradient(left, rgba(0,0,0,.1), transparent); /* texture */
background-size: 4px 1px;
display: inline-block;
font-size: 36px;
font-weight: bold;
height: 42px;
line-height: 42px;
padding: 8px 35px;
position: relative;
text-shadow: 0 2px 1px rgba(0,0,0,0.3);
text-transform: uppercase;
z-index: 100;
}
#xmas .xfold {
background-image: linear-gradient(left, transparent 40%, rgba(0,0,0,0.6) 100%),
linear-gradient(left, rgba(0,0,0,.1), transparent);
background-size: 100% 100%, 4px 1px;
background-color: red;
height: 60px;
mask-image: -ms-gradient(linear, 0 0, 100% 100%, from(rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,1)), to(rgba(0,0,0,1))),
-ms-gradient(linear, 100% 0, 0 100%, from(rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,0)), to(rgba(0,0,0,0)));
mask-image: -moz-gradient(linear, 0 0, 100% 100%, from(rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,1)), to(rgba(0,0,0,1))),
-moz-gradient(linear, 100% 0, 0 100%, from(rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,0)), to(rgba(0,0,0,0)));
mask-image: -o-gradient(linear, 0 0, 100% 100%, from(rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,1)), to(rgba(0,0,0,1))),
-o-gradient(linear, 100% 0, 0 100%, from(rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,0)), to(rgba(0,0,0,0)));
mask-image: -webkit-gradient(linear, 0 0, 100% 100%, from(rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,1)), to(rgba(0,0,0,1))),
-webkit-gradient(linear, 100% 0, 0 100%, from(rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,0)), to(rgba(0,0,0,0)));
mask-image: gradient(linear, 0 0, 100% 100%, from(rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,0)), color-stop(50%,rgba(0,0,0,1)), to(rgba(0,0,0,1))),
gradient(linear, 100% 0, 0 100%, from(rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,1)), color-stop(50%,rgba(0,0,0,0)), to(rgba(0,0,0,0)));
position: absolute;
top: 10px;
width: 100px;
}
#xmas .xfold:after {
background: #e30404;
box-shadow: inset 0 0 100px 0 rgba(0,0,0,0.3);
content: "";
display: block;
height:58px;
position: absolute;
right: 0;
transform: skewY(16deg);
top: -5px;
width: 35px;
}
#xmas .xleft {
left: -65px;
}
#xmas .xright {
transform: scalex(-1);
right: -65px;
}
#xmas h1 .xtitle:before,
#xmas h1 .xtitle:after {
color: #fc0;
content: "*";
display: block;
font-size: 18px;
font-weight: normal;
height: 1px;
line-height: 64px;
position: absolute;
text-align: center;
text-shadow: 0 2px 0 rgba(0,0,0,0.3);
top: 0;
width: 35px;
}
#xmas h1 .xtitle:before {
left: 0px;
}
#xmas h1 .xtitle:after {
right: 0px;
}
#xmas h2 {
font-size: 14px;
opacity: 0.8;
text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
<div id="xmas">
<div class="xribbon">
<h1>
<span class="xtitle">Merry Christmas!</span>
<span class="xfold xleft"></span>
<span class="xfold xright"></span>
</h1>
<h2>from eCSSpert!</h2>
</div>
</div>
{"view":"split","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment