css定義網頁佈局漂亮的button按鈕代碼
<!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=gb2312" />
<title>css定義網頁佈局漂亮的button按鈕代碼 </title>
<style>
.btn {
border-right: #7b9ebd 1px solid; padding-right: 2px; border-top: #7b9ebd 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#cecfde); border-left: #7b9ebd 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #7b9ebd 1px solid
}
.btn1_mouseout {
border-right: #7ebf4f 1px solid; padding-right: 2px; border-top: #7ebf4f 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#b3d997); border-left: #7ebf4f 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #7ebf4f 1px solid
}
.btn1_mouseover {
border-right: #7ebf4f 1px solid; padding-right: 2px; border-top: #7ebf4f 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#cae4b6); border-left: #7ebf4f 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #7ebf4f 1px solid
}
.btn2 {padding: 2 4 0 4;font-size:12px;height:23;background-color:#ece9d8;border-width:1;}
.btn3_mouseout {
border-right: #2c59aa 1px solid; padding-right: 2px; border-top: #2c59aa 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#c3daf5); border-left: #2c59aa 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #2c59aa 1px solid
}
.btn3_mouseover {
border-right: #2c59aa 1px solid; padding-right: 2px; border-top: #2c59aa 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#d7e7fa); border-left: #2c59aa 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #2c59aa 1px solid
}
.btn3_mousedown
{
border-right: #ffe400 1px solid; padding-right: 2px; border-top: #ffe400 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#c3daf5); border-left: #ffe400 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #ffe400 1px solid
}
.btn3_mouseup {
border-right: #2c59aa 1px solid; padding-right: 2px; border-top: #2c59aa 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#c3daf5); border-left: #2c59aa 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #2c59aa 1px solid
}
.btn_2k3 {
border-right: #002d96 1px solid; padding-right: 2px; border-top: #002d96 1px solid; padding-left: 2px; font-size: 12px; filter: progid:dximagetransform.microsoft.gradient(gradienttype=0, startcolorstr=#ffffff, endcolorstr=#9dbcea); border-left: #002d96 1px solid; cursor: hand; color: black; padding-top: 2px; border-bottom: #002d96 1px solid
}
</style>
</head>
<body>
<button class=btn title="好看的按鈕">好看的按鈕</button><p></p>
<button
class=btn1_ mouseout onmouseover="this.classname='btn1_mouseover'"
onmouseout="this.classname='btn1_mouseout'"
title="好看的按鈕">好看的按鈕</button>
<button
class=btn1_mouseout onmouseover=" this.classname='btn1_mouseover'"
onmouseout="this.classname='btn1_mouseout'" disabled>好看的按鈕</ button>
<p>
<button class=btn2 title="好看的按鈕">好看的按鈕</button>
<p>
< button class=btn3_mouseout onmouseover="this.classname='btn3_mouseover'"
onmouseout="this.classname=' btn3_mouseout'"
onmousedown="this.classname='btn3_mousedown'"
onmouseup="this.classname=' btn3_mouseup'"
title="好看的按鈕">好看的按鈕</button>
<p>
<button class=btn_2k3 title=" 好看的按鈕">好看的</button>
</body>
</html>