css form 表单组对齐

2014年7月1日 15:31:17

第一次写css,见谅

css:

 .form-box .form-group .form-label {text-align: right; width: 200px; height: 34px; line-height: 34px; font:14px; margin-right: 10px;}
.form-box .form-group .form-input {text-align: left; width: 200px; height: 34px; line-height: 34px; vertical-align: middle; border:1px solid #ccc; font-size: 14px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; border-radius: 4px; display: inline;}
.form-box .form-group .form-input-select {text-align: left; width: 200px; height: 34px; line-height: 34px; vertical-align: middle; border:1px solid #ccc; font-size: 14px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; padding: 7px 12px; border-radius: 4px; display: inline;}
.form-box .form-group .form-tip {margin: 5px;padding: 0px;width: 200px;text-align: center; display: inline;}
.form-box .form-submit {margin-left: 200px}

html:

 <form class="form-box" >
<div class="form-group">
<label class="form-label">表单名: </label>
<input type="text" class="form-input">
<span class="form-tip"></span>
</div>
<div class="form-group">
<label class="form-label">表单名: </label>
<select class="form-input-select">
<span class="form-tip"></span>
</div>
<input type="submit" class="form-submit" value="go!" >
</form>

-----------------

 select onchange: onchange='selectAccount(this.options[this.selectedIndex].value)

 var selectGame = document.getElementById('gamename');
var selectedIndex = selectGame.selectedIndex;
var gameid = selectGame.options[selectedIndex].value;
上一篇:echarts迁移图动态加载


下一篇:js常用正则表达式表单验证代码