Precious hover in pure CSS
experiment for test.genue.ru website.
experiment for test.genue.ru website.
<html>
<head>
<title id="main_title">pure CSS precious</title>
<meta http-equiv="Content-Language" content="en" />
</head>
<body>
<div id="precious_holder">
<div id="orange">
<div id="one"></div>
<div id="two"></div>
<div id="three"></div>
<div id="four"></div>
</div>
<div id="green"></div>
<div id="yellow">
<div id="one"></div>
<div id="two"></div>
</div>
<div id="base">
<div id="left">
</div>
<div id="right">
</div>
</div>
<div id="one" class="ink"></div>
<div id="two" class="ink"></div>
<div id="three" class="ink"></div>
<div id="four" class="ink"></div>
</div>
<div id="lego" ><a href="http://legomushroom.com" title="Lego Mushroom">lego m</a></div>
</body>
</html>
#precious_holder {
width: 92px;
height: 92px;
margin: 5em auto;
cursor: pointer;
position: relative;
/* anti-flickering pattern*/
backface-visibility: hidden;
backface-visibility: hidden;
backface-visibility: hidden;
backface-visibility: hidden;
perspective: 1000;
perspective: 1000;
perspective: 1000;
perspective: 1000;
/* anti-flickering pattern*/
}
#precious_holder div.ink#one,
#precious_holder div.ink#two,
#precious_holder div.ink#three,
#precious_holder div.ink#four {
position: absolute;
z-index: -1;
left: 50%;
top: 50%;
width: 0px;
height: 0px;
transform-origin: 50% 50%;
border-radius: 100%;
background-color: #43c9f0;
}
#precious_holder #two {
left: 58%;
top: -152%;
}
#precious_holder div:not(.ink) {
border-radius: 5px;
}
#precious_holder #yellow {
width: 80px;
height: 50px;
left: 4px;
position: relative;
top: -8px;
}
#precious_holder #yellow #one {
background-color: #000;
height: 0px;
width: 5px;
position: absolute;
top: 2px;
left: 8px;
transform: rotate(-26);
}
#precious_holder #yellow #two {
background-color: #000;
width: 5px;
position: absolute;
top: 46px;
left: 40px;
transform: rotate(26deg);
}
#precious_holder #green {
background-color: #000;
width: 0px;
height: 5px;
position: relative;
top: -5px;
left: 4px;
}
#precious_holder #orange {
width: 70px;
left: 10px;
height: 24px;
position: relative;
}
#precious_holder #orange #one {
background-color: #000;
height: 0px;
width: 5px;
position: absolute;
top: 2px;
left: 8px;
transform: rotate(0);
}
#precious_holder #orange #two {
background-color: #000;
height: 0px;
width: 5px;
position: absolute;
top: 20px;
left: 12px;
transform: rotate(52deg);
}
#precious_holder #orange #three {
background-color: #000;
height: 0px;
width: 5px;
position: absolute;
top: 2px;
left: 34px;
transform: rotate(-48deg);
}
#precious_holder #orange #four {
background-color: #000;
height: 0px;
width: 5px;
position: absolute;
top: 18px;
left: 56px;
transform: rotate(26deg);
}
#precious_holder:hover div:not(.ink) {
opacity: 1;
}
#precious_holder:hover div.ink#one {
left: -14px;
top: -14px;
width: 100px;
height: 100px;
transition: 2s ease-out;
}
#precious_holder:hover div.ink#two {
left: -10px;
top: -10px;
width: 100px;
height: 100px;
transition: 2s ease-out;
}
#precious_holder:hover div.ink#three {
left: 0px;
top: -15px;
width: 100px;
height: 100px;
transition: 2s ease-out;
}
#precious_holder:hover div.ink#four {
left: 0px;
top: -25px;
width: 100px;
height: 100px;
transition: 2s ease-out;
}
#precious_holder:hover #yellow #one {
height: 54px;
left: 30px;
top: -3px;
transform: rotate(-26deg);
transition: all 1.2s ease-out 0.05s;
}
#precious_holder:hover #yellow #two {
height: 52px;
left: 49px;
top: -2px;
transform: rotate(26deg);
transition: all 0.28s ease-out 1s;
}
#precious_holder:hover #green {
width: 84px;
transition: all 1s ease-in-out;
}
#precious_holder:hover #orange #one {
height: 20px;
left: 8px;
transform: rotate(-26deg);
transition: all 0.5s ease-out;
}
#precious_holder:hover #orange #two {
height: 28px;
left: 22px;
top: -3px;
transform: rotate(52deg);
transition: all 0.5s ease-out 0.4s;
}
#precious_holder:hover #orange #three {
height: 28px;
left: 44px;
top: -3px;
transform: rotate(-48deg);
transition: all 0.5s ease-out 0.8s;
}
#precious_holder:hover #orange #four {
height: 20px;
left: 58px;
top: 3px;
transform: rotate(26deg);
transition: all 0.2s ease-out 1.2s;
}
#lego {
position: absolute;
z-index: 20;
left: 20px;
top: -4px;
width: 50px;
background-color: rgba(0,200,200,0.95);
border-radius: 2px;
box-shadow: 0 0 5px #000;
padding: 6px 10px;
border: 2px solid #fff;
border-radius: 4px;
font-size: 14px;
font-family: monospace;
text-align: center;
box-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,0.10), 0 0 5px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.30), 0 3px 5px rgba(0,0,0,0.20), 0 5px 10px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.20), 0 20px 20px rgba(0,0,0,0.15);
}
#lego a {
text-shadow: 0 0 3px #888;
text-decoration: none;
font-size: 14px;
color: #fff;
}
#debug {
position: absolute;
right: 0;
height: 100%;
}
#debug #console {
display: none;
width: 140px;
height: 200px;
position: relative;
top: 0;
right: 0;
padding: 10px;
font-family: 'Consolas';
background-color: rgba(255,255,255,0.40);
border-bottom-left-radius: 5px;
overflow: auto;
}
#debug #console p {
font-size: 12px;
margin: 10px 0;
text-align: left;
}
#debug #console p.ok {
color: #008000;
}
#debug #console p.warning {
color: #ffa500;
}
#debug #console p.alert {
color: #000;
}
#debug #notification_wrap {
position: fixed;
right: 14px;
bottom: 10px;
width: 200px;
min-height: 50px;
z-index: 20;
}
#debug #notification_wrap #noty {
width: 100%;
min-height: 40px;
border: 2px solid #fff;
border-radius: 5px;
text-align: center;
padding: 6px 10px;
box-sizing: border-box;
color: #fff;
text-shadow: 0 0 4px rgba(0,0,0,0.80);
cursor: pointer;
margin: 10px;
display: none;
box-shadow: 0 0 10px rgba(0,0,0,0.80), inset 0 0 2px #000;
transition: bottom 0.5s linear;
text-shadow: 0 -1px 1px #008000;
cursor: pointer;
margin: 10px;
display: none;
box-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,0.10), 0 0 5px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.30), 0 3px 5px rgba(0,0,0,0.20), 0 5px 10px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.20), 0 20px 20px rgba(0,0,0,0.15);
transition: bottom 0.5s linear;
padding: auto;
}
#debug #notification_wrap #noty.ok {
background-color: rgba(0,200,0,0.95) !important;
}
#debug #notification_wrap #noty.alert {
background-color: rgba(200,0,0,0.95) !important;
}
#debug #notification_wrap #noty.warning {
background-color: rgba(0,200,200,0.95) !important;
}
@-moz-keyframes one {
0% {
height: 0px;
left: 3px;
}
50% {
height: 20px;
left: 8px;
}
100% {
height: 0px;
left: 3px;
}
}
@-webkit-keyframes one {
0% {
height: 0px;
left: 3px;
}
50% {
height: 20px;
left: 8px;
}
100% {
height: 0px;
left: 3px;
}
}
@-o-keyframes one {
0% {
height: 0px;
left: 3px;
}
50% {
height: 20px;
left: 8px;
}
100% {
height: 0px;
left: 3px;
}
}
@-ms-keyframes one {
0% {
height: 0px;
left: 3px;
}
50% {
height: 20px;
left: 8px;
}
100% {
height: 0px;
left: 3px;
}
}
@keyframes one {
0% {
height: 0px;
left: 3px;
}
50% {
height: 20px;
left: 8px;
}
100% {
height: 0px;
left: 3px;
}
}
@-moz-keyframes three {
0% {
height: 0px;
left: 34px;
top: 2px;
}
50% {
height: 28px;
left: 44px;
top: -3px;
}
100% {
height: 0px;
left: 34px;
top: 2px;
}
}
@-webkit-keyframes three {
0% {
height: 0px;
left: 34px;
top: 2px;
}
50% {
height: 28px;
left: 44px;
top: -3px;
}
100% {
height: 0px;
left: 34px;
top: 2px;
}
}
@-o-keyframes three {
0% {
height: 0px;
left: 34px;
top: 2px;
}
50% {
height: 28px;
left: 44px;
top: -3px;
}
100% {
height: 0px;
left: 34px;
top: 2px;
}
}
@-ms-keyframes three {
0% {
height: 0px;
left: 34px;
top: 2px;
}
50% {
height: 28px;
left: 44px;
top: -3px;
}
100% {
height: 0px;
left: 34px;
top: 2px;
}
}
@keyframes three {
0% {
height: 0px;
left: 34px;
top: 2px;
}
50% {
height: 28px;
left: 44px;
top: -3px;
}
100% {
height: 0px;
left: 34px;
top: 2px;
}
}
@-moz-keyframes four {
0% {
top: 18px;
height: 0px;
left: 56px;
}
50% {
top: 3px;
height: 20px;
left: 58px;
}
100% {
top: 18px;
height: 0px;
left: 56px;
}
}
@-webkit-keyframes four {
0% {
top: 18px;
height: 0px;
left: 56px;
}
50% {
top: 3px;
height: 20px;
left: 58px;
}
100% {
top: 18px;
height: 0px;
left: 56px;
}
}
@-o-keyframes four {
0% {
top: 18px;
height: 0px;
left: 56px;
}
50% {
top: 3px;
height: 20px;
left: 58px;
}
100% {
top: 18px;
height: 0px;
left: 56px;
}
}
@-ms-keyframes four {
0% {
top: 18px;
height: 0px;
left: 56px;
}
50% {
top: 3px;
height: 20px;
left: 58px;
}
100% {
top: 18px;
height: 0px;
left: 56px;
}
}
@keyframes four {
0% {
top: 18px;
height: 0px;
left: 56px;
}
50% {
top: 3px;
height: 20px;
left: 58px;
}
100% {
top: 18px;
height: 0px;
left: 56px;
}
}
@-moz-keyframes two {
0% {
top: 20px;
height: 0px;
left: 12px;
}
50% {
top: -5px;
height: 32px;
left: 22px;
}
100% {
top: 20px;
height: 0px;
left: 12px;
}
}
@-webkit-keyframes two {
0% {
top: 20px;
height: 0px;
left: 12px;
}
50% {
top: -5px;
height: 32px;
left: 22px;
}
100% {
top: 20px;
height: 0px;
left: 12px;
}
}
@-o-keyframes two {
0% {
top: 20px;
height: 0px;
left: 12px;
}
50% {
top: -5px;
height: 32px;
left: 22px;
}
100% {
top: 20px;
height: 0px;
left: 12px;
}
}
@-ms-keyframes two {
0% {
top: 20px;
height: 0px;
left: 12px;
}
50% {
top: -5px;
height: 32px;
left: 22px;
}
100% {
top: 20px;
height: 0px;
left: 12px;
}
}
@keyframes two {
0% {
top: 20px;
height: 0px;
left: 12px;
}
50% {
top: -5px;
height: 32px;
left: 22px;
}
100% {
top: 20px;
height: 0px;
left: 12px;
}
}
#base #left{
height:72px;
width:6px;
background-color:black;
transform: rotate(-41deg);
position:absolute;
top:10px;
left:21px
}
#base #left:after{
content:'';
height:25px;
width:6px;
background-color:black;
transform: rotate(70deg);
position:absolute;
top:-14px;
left:10px
}
#base #left:before{
content:'';
height:67px;
width:6px;
background-color:black;
transform: rotate(131deg);
position:absolute;
top:-18px;
left:44px
}
#base #right{
height:72px;
width:6px;
background-color:black;
transform: rotate(41deg);
position:absolute;
top:10px;
left:65px
}
#base #right:after{
content:'';
height:25px;
width:6px;
background-color:black;
transform: rotate(-76deg);
position:absolute;
top:-13px;
left:-12px
}