Skip to content

Commit

Permalink
Shapes and logos
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasshields committed Jul 7, 2011
1 parent b2fb0d9 commit 2e795ce
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 0 deletions.
53 changes: 53 additions & 0 deletions Chrome Logo.html
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<title>Chrome Logo - CSS</title>
<style type="text/css">
.chrome {
margin-top:20px;
border-radius:50%;
position:relative;
border-style:solid;
border-width:20px;
border-top-color:red;
border-left-color:green;
border-right-color:yellow;
border-bottom-color:green;
width:20px;
height:20px;
background-color:rgb(50,120,200);
}
.chrome:before,.chrome:after{
content:"";
position:absolute;
height:20px;
width:20px;

border-radius:50%;
border-style:solid;
border-width:20px;
margin-top:-20px;
margin-left:-20px;
}
.chrome:before {

border-top-color:red;
border-left-color:transparent;
border-right-color:transparent;
border-bottom-color:green;
margin-top:-20px;
margin-left:-20px;
-webkit-transform:rotate(35deg)
}
.chrome:after {
border-color:transparent;
border-bottom-color:yellow;
-webkit-transform:rotate(-30deg);
}
</style>
</head>
<body>

<div class="chrome"></div>
</body>
</html>
5 changes: 5 additions & 0 deletions README
@@ -0,0 +1,5 @@
CSS Art is a collection of neat designs that can be accomplished with CSS. Some are useful, semantic designs that don't require lots of markup to work, others are doodles that serve no real purpose, like logos.
As an aside, while several of these designs are great for real life design, others are not. Even if a logo can be made with CSS only, it shouldn't: CSS is for design. In a feed reader, non-CSS enabled browser, the logo won't show up, and that's bad.
If you want to contribute to the project, fork it, create a new html file (or edit an existing file) with your design (no separate CSS files, please), and submit a pull request.
If you submit several designs and want to become an "official" contributor, email me and i'll consider adding you.
Thanks, and enjoy. :)
112 changes: 112 additions & 0 deletions Shapes.html
@@ -0,0 +1,112 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Shapes</title>
<style type="text/css">
.shapes {
font-family:Arial, Helvetica, Sans;
font-weight:bold;
text-align:center;
text-shadow:#000 0 0 1px;
}
.circle {
height:90px;
width:90px;
line-height:90px;
font-size:65px;
font-weight:bold;
background-color:#eee;
margin-top:20px;
box-shadow:0 0 2px #930;
border:4px solid #930;
border-radius:50%;
}
.triangle {

position:relative;
border-bottom:4px solid #930;
height:87px;
width:102px;
margin-top:10px;
background-color:#eee;
overflow:hidden;
font-size:65px;
color:#000;
text-align:center;
line-height:110px;

}
.triangle:before, .triangle:after {
position:absolute;
content:"";
width:100px;
height:100px;
border:4px solid #930;
background-color:#fff;
box-shadow:0 0 2px #930;
box-shadow:inset 0 0 2px #930;
}
.triangle:before {
-webkit-transform:rotate(30deg);
-moz-transform:rotate(30deg);
left:-70px;
top:-31px;
border-top:none;
border-left:none;
border-bottom:none;


}
.triangle:after {
-webkit-transform:rotate(60deg);
-moz-transform:rotate(60deg);
left:70px;
border-left:none;
border-right:none;
border-top:none;
top:-33px;
}
.triangle2 {
width:120px;
height:120px;
line-height:120px;
position:relative;
margin-top:20px;
font-size:65px;
line-height:120px;
padding-top:3px;
}
.triangle2:before, .triangle2:after {
content: "";
position:absolute;
top:0;
left:0;
z-index:-1;
}
.triangle2:before {
top:-60px;
border:60px solid transparent;
border-bottom:100px solid #930;
}
.triangle2:after {
border:52px solid transparent;
border-bottom:84px solid #eee;
top:-42px;
left:8px;

}
</style>
</head>
<body>
<div class="circle shapes">
0
</div>
<div class="triangle shapes">
3
</div>
A nicer triangle; sharper edges:
<div class="triangle2 shapes">
3
</div>
</body>
</html>
70 changes: 70 additions & 0 deletions Stackoverflow Logo.html
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<title>StackOverflow Logo - CSS</title>
<style type="text/css">
h2 {
display:inline-block;
margin-left:5px;
font-size:30px;
font-family:Segoe UI;
font-weight:normal;
text-shadow:#999 0 0 1px;
}
.so {
width:30px;
height:20px;
border:4px solid #999;
border-top:none;
position:relative;
margin-top:20px;
display:inline-block;
}
.so:before, .so:after, .so span, .so span:before, .so span:after {
content:"";
width:24px;
height:5px;
background-color:#888;
position:absolute;
}
.so:before {
top:10px;
left:3px;
}
.so:after {
-webkit-transform:rotate(7deg);
top:2px;
left:3px;
background-color:#A68A6E;
}
.so span:first-child {
top:-7px;
left:4px;
background-color:#c09553;
-webkit-transform:rotate(20deg);
}
.so span:first-child:before {
background-color:#d38b28;
-webkit-transform:rotate(16deg);
top:-9px;
left:1px;
}
.so span:first-child:after {
background-color:#FD8A07;
-webkit-transform:rotate(40deg);
top:-18px;
left:6px
}
.so span:last-child {
background-color:#FE7A15;
top:-25px;
left:25px;
-webkit-transform:rotate(80deg);
}
.so span:last-child:before, .so span:last-child:after { display:none; }
</style>
</head>
<body>
<div class="so"><span></span><span></span></div><h2>stack<strong>overflow</strong></h2>
</body>
</html>

0 comments on commit 2e795ce

Please sign in to comment.