Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A pure CSS Science logo, created at codepen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Pure CSS Science logo with hover transforms &middot; CodePen</title>
<!--
Copyright (c) 2012 Chris Mounsey, http://codepen.io/devilskitchen
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/normalize.css">
<style>
.logo-container {
border-radius: 90px;
width: 150px;
height: 150px;
margin: 2em auto 2em auto;
padding: 15px;
position: relative;
transition: box-shadow 0.3s ease-in-out;
}
.logo-container:hover {
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
transition: box-shadow 0.3s ease-in-out;
}
.logo-container .logo-link {
display: block;
text-indent: -9999em;
overflow: hidden;
text-align: left;
direction: ltr;
background: transparent;
border-radius: 90px;
width: 150px;
height: 150px;
background-color: #7eaaad;
border: 1px solid transparent;
transition: box-shadow 0.3s ease-in-out;
}
.logo-container .logo-link:hover {
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
transition: box-shadow 0.3s ease-in-out;
}
.science-logo {
position: relative;
top: 10px;
transition: 0.15s ease-in-out;
}
.science-logo:hover {
transform: rotate(45deg);
transition: 0.25s ease-in-out;
}
.science-logo .lip {
margin: 0 auto;
background: white;
width: 30px;
height: 5px;
border-radius: 2px;
}
.science-logo .stem {
background: white;
width: 22px;
height: 38px;
margin: -1px auto;
}
.science-logo .stem:before {
content: "";
display: block;
width: 19px;
height: 1px;
background: #7eaaad;
position: relative;
top: 1px;
opacity: 0.7;
}
.science-logo .neck {
background: white;
width: 34px;
height: 10px;
margin: 0 auto;
position: relative;
z-index: 1;
}
.science-logo .neck:before {
content: "";
display: block;
background: #7eaaad;
width: 14px;
height: 14px;
border-radius: 7px;
position: absolute;
top: -9px;
left: -9px;
}
.science-logo .neck:after {
content: "";
display: block;
background: #7eaaad;
width: 14px;
height: 14px;
border-radius: 7px;
position: absolute;
top: -9px;
right: -9px;
}
.science-logo .bowl {
background: white;
height: 52px;
width: 52px;
border-radius: 30px;
margin: -10px auto 0 auto;
padding: 4px;
}
.science-logo .bowl .liquid {
background: -webkit-linear-gradient(top, #ff3019 0%, #cf0404 100%);
height: 100%;
width: 100%;
border-radius: 30px;
position: relative;
}
.science-logo .bowl .liquid .bubbles {
width: 16px;
height: 16px;
border-radius: 8px;
opacity: 0.8;
background: -webkit-radial-gradient(center, ellipse cover, #a90329 0%, #8f0222 44%, #6d0019 100%);
position: relative;
top: 26px;
left: 8px;
}
.science-logo .bowl .liquid .bubbles:before {
content: "";
display: block;
width: 10px;
height: 10px;
opacity: 0.9;
border-radius: 8px;
background: -webkit-radial-gradient(center, ellipse cover, #a90329 0%, #8f0222 44%, #6d0019 100%);
position: absolute;
top: -4px;
left: 10px;
}
.science-logo .bowl .liquid .bubbles:after {
content: "";
display: block;
width: 6px;
height: 6px;
opacity: 0.9;
border-radius: 8px;
background: -webkit-radial-gradient(center, ellipse cover, #feffff 0%, #d2ebf9 100%);
position: absolute;
top: -3px;
left: 4px;
}
</style>
<style>
#codepen-footer, #codepen-footer * {
-webkit-box-sizing: border-box !important;
-moz-box-sizing: border-box !important;
box-sizing: border-box !important;
}
#codepen-footer {
display: block !important;
position: fixed !important;
bottom: 0 !important;
left: 0 !important;
width: 100% !important;
padding: 0 10px !important;
margin: 0 !important;
height: 30px !important;
line-height: 30px !important;
font-size: 12px !important;
color: #eeeeee !important;
background-color: #505050 !important;
text-align: left !important;
background: -webkit-linear-gradient(top, #505050, #383838) !important;
background: -moz-linear-gradient(top, #505050, #383838) !important;
background: -ms-linear-gradient(top, #505050, #383838) !important;
background: -o-linear-gradient(top, #505050, #383838) !important;
border-top: 1px solid black !important;
border-bottom: 1px solid black !important;
border-radius: 0 !important;
border-image: none !important;
box-shadow: inset 0 1px 0 #6e6e6e, 0 2px 2px rgba(0, 0, 0, 0.4) !important;
z-index: 300 !important;
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif !important;
letter-spacing: 0 !important;
word-spacing: 0 !important;
}
#codepen-footer a {
color: #a7a7a7 !important;
text-decoration: none !important;
}
#codepen-footer a:hover {
color: white !important;
}
</style>
<script>
// Kill alerts, confirmations and prompts
window.alert = function(){};
window.confirm = function(){};
window.prompt = function(){};
window.open = function(){};
window.print = function(){};
</script>
<script src="http://codepen.io/javascripts/libs/prefixfree.min.js"></script>
</head>
<body>
<div class="logo-container">
<a href="#" class="logo-link science">Science
<div class="science-logo">
<div class="lip"></div>
<div class="stem"></div>
<div class="neck"></div>
<div class="bowl">
<div class="liquid">
<div class="bubbles"></div>
</div>
</div>
</div>
</a>
</div>
<div id="codepen-footer">
<a style="color: #f73535 !important;" href="https://codepen.wufoo.com/forms/m7x3r3/def/field14=" onclick="window.open(this.href, null, 'height=517, width=680, toolbar=0, location=0, status=1, scrollbars=1, resizable=1'); return false">Report Abuse</a>
&nbsp;
<a href="/devilskitchen/pen/jkpbD">Edit this Pen</a>
</div>
</body>
</html>
<div class="logo-container">
<a href="#" class="logo-link science">Science
<div class="science-logo">
<div class="lip"></div>
<div class="stem"></div>
<div class="neck"></div>
<div class="bowl">
<div class="liquid">
<div class="bubbles"></div>
</div>
</div>
</div>
</a>
</div>
.logo-container {
border-radius:90px;
width:150px;
height:150px;
margin:2em auto 2em auto;
padding:15px;
position:relative;
transition:box-shadow 0.3s ease-in-out;
&:hover {
box-shadow:inset 0 0 8px rgba(0,0,0,0.5);
transition:box-shadow 0.3s ease-in-out;
}
.logo-link {
display:block;
text-indent:-9999em;
overflow: hidden;
text-align: left;
direction: ltr;
background:transparent;
border-radius:90px;
width:150px;
height:150px;
background-color:#7eaaad;
border:1px solid transparent;
transition:box-shadow 0.3s ease-in-out;
&:hover {
box-shadow:inset 0 0 8px rgba(0,0,0,0.5);
transition:box-shadow 0.3s ease-in-out;
}
}
}
.science-logo {
position:relative;
top:10px;
transition:0.15s ease-in-out;
&:hover {
transform:rotate(45deg);
transition:0.25s ease-in-out;
}
.lip {
margin:0 auto;
background:white;
width:30px;
height:5px;
border-radius:2px;
}
.stem {
background:white;
width:22px;
height:38px;
margin:-1px auto;
&:before {
content:"";
display:block;
width:19px;
height:1px;
background:#7eaaad;
position:relative;
top:1px;
opacity:0.7;
}
&:after {}
}
.neck {
background:white;
width:34px;
height:10px;
margin:0 auto;
position:relative;
z-index:1;
&:before {
content:"";
display:block;
background:#7eaaad;
width:14px;
height:14px;
border-radius:7px;
position:absolute;
top:-9px;
left:-9px;
}
&:after {
content:"";
display:block;
background:#7eaaad;
width:14px;
height:14px;
border-radius:7px;
position:absolute;
top:-9px;
right:-9px;
}
}
.bowl {
background:white;
height:52px;
width:52px;
border-radius:30px;
margin:-10px auto 0 auto;
padding:4px;
.liquid {
background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);
height:100%;
width:100%;
border-radius:30px;
position:relative;
.bubbles {
width:16px;
height:16px;
border-radius:8px;
opacity:0.8;
background: -webkit-radial-gradient(center, ellipse cover, #a90329 0%,#8f0222 44%,#6d0019 100%);
position:relative;
top:26px;
left:8px;
&:before {
content:"";
display:block;
width:10px;
height:10px;
opacity:0.9;
border-radius:8px;
background: -webkit-radial-gradient(center, ellipse cover, #a90329 0%,#8f0222 44%,#6d0019 100%);
position:absolute;
top:-4px;
left:10px;
}
&:after {
content:"";
display:block;
width:6px;
height:6px;
opacity:0.9;
border-radius:8px;
background: -webkit-radial-gradient(center, ellipse cover, #feffff 0%,#d2ebf9 100%);
position:absolute;
top:-3px;
left:4px;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment