CD Style dengan CSS3
CD Style dengan CSS3
by Ahmad Najiullah
HTML
<div id="music-style">
<span class="corte-music">
<img src="http://3.bp.blogspot.com/-tplxFxuH6M0/UomhjHH2CCI/AAAAAAAAAXU/dv6NtIoAlao/s1600/Miracle+in+Cell+No.+7+Movie+Poster+-+CD.jpg" />
</span>
<br />
<h6>Miracle in Cell No. 7</h6>
<a class="mask-cd" href="http://scriptslicious.kotaserang.com/2013/11/cd-dan-dvd-style-dengan-css3.html
"></a>
<i class="cd-rol"></i>
</div>
CSS
#music-style {
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
float: left;
margin: 0 90px 40px 0;
position: relative;
}
#music-style a {
display: block;
line-height: 0 !important;
position: absolute;
z-index: 100;
}
#music-style h6 {
background-color: rgba(0, 0, 0, 0.7);
bottom: 25px;
color: #FFF;
font-family: Arial;
font-size: 12px;
font-weight: bold;
margin: 0;
padding: 10px 0;
position: absolute;
right: 3px;
text-align: center;
text-shadow: 1px 1px 0 #000000;
width: 210px;
z-index: 60;
}
#music-style:hover h6 {
color: #66bcff;
}
.mask-cd {
background: url("https://lh3.googleusercontent.com/-_stK-cZvmiM/UONbBgBpnzI/AAAAAAAAEOk/22JaflzSH-s/s1600/mask-cd.png") no-repeat scroll 0 0 transparent;
box-shadow: 2px 0 1px rgba(0, 0, 0, 0.2) inset;
height: 190px;
left: 0;
top: 3px;
width: 250px;
}
.corte-music {
border-color: #222;
border-style: solid;
border-width: 3px 3px 3px 40px;
float: left;
height: 190px;
overflow: hidden;
position: relative;
width: 210px;
z-index: 50;
}
.corte-music img {
max-height: 300px;
}
.cd-rol {
background: url("https://lh4.googleusercontent.com/-WwGYVVIIaZE/UONbACb0dVI/AAAAAAAAEOU/Yl1e17olN7U/s1600/cd.png") no-repeat scroll 0 0 transparent;
display: block;
height: 180px;
position: absolute;
right: 0;
top: 7px;
transform: rotate(-230deg);
-moz-transform: rotate(-230deg);
-webkit-transform: rotate(-230deg);
-o-transform: rotate(-230deg);
width: 180px;
z-index: 10;
}
.cd-rol, #music-style h6 {
transition: all 300ms ease-in-out 0s;
-moz-transition: all 300ms ease-in-out 0s;
-webkit-transition: all 300ms ease-in-out 0s;
-o-transition: all 300ms ease-in-out 0s;
}
#music-style:hover .cd-rol {
right: -73px;
transform: rotate(0);
-moz-transform: rotate(0);
-webkit-transform: rotate(0);
-o-transform: rotate(0);
}