Q:如何改变文本框和按钮的样式?
A:用CSS定义表单内的文本框和按钮即可,举例如下:
首先,定义CSS类:
<style type="text/css">
<!--
.editbox { background: #E3E3E3; border-bottom: #333333 1px solid; border-left: 0px; border-right: 0px; border-top: 0px; color: #333333; cursor: text; font-family: "Arial"; font-size: 9pt; height: 20px; padding: 1px}
.button { background: #F2F2F2; border: #333333 1px solid; color: #333333; cursor: hand; font-size: 9pt; height: 20px; padding: 1px}
-->
</style>
然后分别应用到文本框和按钮上:
<input type="text" name="name" class="editbox">
<input type="submit" name="login" value="登录" class="button">