
image background saat over, kita namakan bg_button_over.gif
image background saat tidak over, kita namakan bg_button.gif
Contoh html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#button a {
margin-top: 12px;
float: left;
height: 23px;
width: 106px;
border: 1px solid #CF6F18;
background-image: url(images/bg_button_over.gif);
font-family: Arial;
font-size: 12px;
line-height: 23px;
font-weight: bold;
color: #000000;
text-align: center;
vertical-align: text-top;
text-decoration: none;
}
#button a:hover{
background-image: url(images/bg_button.gif);
border: 1px solid #6A9EC3;
}
-->
</style>
</head>
<body>
<div id="button"><a href="/search/">Search</a></div>
</body>
</html>
Untuk contohnya dapat dilihat di http://www.prowebpro.com/pic/erna/membuat_button_gradasi_dengan_css.php
PT. Proweb Indonesia
Perkantoran Duta Merlin No F4
Jl. Gadjah Mada 3-5
Jakarta Pusat
| Phone | : | 021 - 2636 3170 |
| Mobile | : | 0856 - 922 622 03 |
| 0812 - 806 2772 | ||
| 0816 - 180 8005 | ||
| Fax | : | 021 - 633 5765 |
| Web | : | www.proweb.co.id |