CSS3 Tombol 3 Dimensi
HTML
<a class='button3' href='#'>Tombol 3 Dimensi</a>
CSS
.button3 {
cursor:pointer;
margin:10px 0px;
background:#479ECD;
padding:10px 15px;
margin:4px 2px;
font:bold 16px Arial,Sans-Serif;
color:#fff;
text-decoration:none;
outline:none;
text-shadow:0px -1px 0px #297EB9;
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-webkit-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 3px 0px #297EB9,
0px 5px 8px rgba(0,0,0,0.4);
-moz-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 3px 0px #297EB9,
0px 5px 8px rgba(0,0,0,0.4);
box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 3px 0px #297EB9,
0px 5px 8px rgba(0,0,0,0.4);
}
.button3:hover {
-webkit-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.4),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 3px 0px #297EB9,
0px 5px 8px rgba(0,0,0,0.4);
-moz-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.4),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 3px 0px #297EB9,
0px 5px 8px rgba(0,0,0,0.4);
box-shadow:inset 0px 0px 20px rgba(255,255,255,0.4),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 3px 0px #297EB9,
0px 5px 8px rgba(0,0,0,0.4);
}
.button3:active {
position:relative;
top:2px;
-webkit-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 1px 0px #297EB9,
0px 3px 3px rgba(0,0,0,0.4);
-moz-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 1px 0px #297EB9,
0px 3px 3px rgba(0,0,0,0.4);
box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 1px 0px #297EB9,
0px 3px 3px rgba(0,0,0,0.4);
}
Demo
Disederhanakan dari: http://css3exp.com/button
Labels: CSS, Eksperimen, Potongan
5 Comments:
Cssnya di taruh di mana ?
Maaf newbie...
By uki, at Sunday, February 26, 2012 at 6:25:00 AM GMT+7
@Uqi Di atas ]]></b:skin> atau </style>
By Taufik Nurrohman, at Sunday, February 26, 2012 at 11:48:00 AM GMT+7
Nice button. Saya coba masukan ke dalam Postingan,tapi buttonnya tidak aktif. Aktifkan hanya saat hover. :'( Ada solusi?
By Suparyanto, at Monday, March 26, 2012 at 11:52:00 PM GMT+7
@Suparyanto Coba tambahkan !important:
.button3:active {
position:relative !important;
top:2px !important;
-webkit-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 1px 0px #297EB9,
0px 3px 3px rgba(0,0,0,0.4) !important;
-moz-box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 1px 0px #297EB9,
0px 3px 3px rgba(0,0,0,0.4) !important;
box-shadow:inset 0px 0px 20px rgba(255,255,255,0.3),
inset 0px -1px 0px rgba(255,255,255,0.3),
0px 1px 0px #297EB9,
0px 3px 3px rgba(0,0,0,0.4) !important;
}
By Taufik Nurrohman, at Tuesday, March 27, 2012 at 8:09:00 AM GMT+7
@Taufik NurrohmanOK,diralat dulu..
By Suparyanto, at Tuesday, March 27, 2012 at 2:19:00 PM GMT+7
Post a Comment
<< Home