提交按钮设置背景图片,以及鼠标经过换背景图
2014-08-22 16:42
344 查看
HTML:用表格布局表单
<form name="pad_form" id="pad_form" action="http://www.tpyx.cn/Accountspromotion/adv_do_register" method="post" >
<table style="text-align:left; width:500px">
<tr>
<td width="100"><label>用户名:</td>
<td width="150"></label><input type="text" id="code" name="username" size="20" /></td>
<td><span id="code_notice" style="color:red; font-size:12px;"></span></td>
</tr>
<tr>
<td><label>登录密码:</label></td>
<td width="150"><input type="password" id="password" name="password" size="20" /></td>
<td><span id="password_notice"></span></td>
</tr>
<tr>
<td><label>重复密码:</label></td>
<td width="150"><input type="password" id="password2" name="password2" size="20" /></td>
<td><span id="password2_notice"></span></td>
</tr>
<tr>
<td><label>服务器:</label></td>
<td width="150"><select id="re_server_id" name="sid"></select></td>
<td><span id="re_server_id_notice"></span></td>
</tr>
<tr>
<td colspan="3" style=" padding-left:50px; padding-top:20px;"><input type="submit" id="submit" value=" " class="formsubmit" /></td>
</tr>
</table>
CSS:为提交按钮设置背景图,和鼠标经过图片
.formsubmit{ background:url(../button.png) no-repeat bottom left; width:247px; height:60px;cursor:pointer; border:0px;}
.formsubmit:hover{ background:url(../button_2.png);}
<form name="pad_form" id="pad_form" action="http://www.tpyx.cn/Accountspromotion/adv_do_register" method="post" >
<table style="text-align:left; width:500px">
<tr>
<td width="100"><label>用户名:</td>
<td width="150"></label><input type="text" id="code" name="username" size="20" /></td>
<td><span id="code_notice" style="color:red; font-size:12px;"></span></td>
</tr>
<tr>
<td><label>登录密码:</label></td>
<td width="150"><input type="password" id="password" name="password" size="20" /></td>
<td><span id="password_notice"></span></td>
</tr>
<tr>
<td><label>重复密码:</label></td>
<td width="150"><input type="password" id="password2" name="password2" size="20" /></td>
<td><span id="password2_notice"></span></td>
</tr>
<tr>
<td><label>服务器:</label></td>
<td width="150"><select id="re_server_id" name="sid"></select></td>
<td><span id="re_server_id_notice"></span></td>
</tr>
<tr>
<td colspan="3" style=" padding-left:50px; padding-top:20px;"><input type="submit" id="submit" value=" " class="formsubmit" /></td>
</tr>
</table>
CSS:为提交按钮设置背景图,和鼠标经过图片
.formsubmit{ background:url(../button.png) no-repeat bottom left; width:247px; height:60px;cursor:pointer; border:0px;}
.formsubmit:hover{ background:url(../button_2.png);}
相关文章推荐
- input 提交表单按钮 背景图片的完美设置
- 设置鼠标移进后以及鼠标点击后的JButton的背景图片
- QT按钮包含图片与文字,以及鼠标停留备注显示,和sheetstyle风格设置。
- 设置文字QT按钮包含图片与文字,以及鼠标停留备注显示,和sheetstyle风格设置。
- gridview模版列设置鼠标移过时背景图片
- css控制submit加载背景图片做提交按钮
- WinFrom鼠标经过时图片按钮放大缩小
- C# winform 按钮 响应鼠标经过变换图片,如何处理?
- Flex中如何通过backgroundImage, backgroundColor和backgroundAlpha样式,设置VBox的背景图片和背景颜色以及改变透明度
- 设置按钮背景图片的代码
- JQ 鼠标滑过按钮改变背景图片
- 设置按钮背景图片的代码
- IOS开发:关于设置UIView的背景为图片的方法以及问题
- display:block定义背景切换,以及flash鼠标经过
- jQuery实现基于鼠标滑动改变按钮背景图片、文字
- android 读取sd卡(sdcard)图片设置为按钮背景(Button背景设置)代码
- Form表单提交按钮图片IE6下背景透明(js提交)
- 去掉button按钮左右两边的留白 设置按钮背景为透明 去掉鼠标点击时出现的虚线边框 层的显示与隐藏
- 基于jquery实现的鼠标滑过按钮改变背景图片
- IOS开发:关于设置UIView的背景为图片的方法以及问题