Loading

Web 代码技巧零碎整理

1、怎么设置<input />里面的type=text的长和宽

      size="30" 长度就是30
      maxlength="15" 最多输入15字符
      还可以用CSS设置宽和高

input{
width:30px;
height:18px;
}



2、html图片按钮的写法

<form id="form1" name="form1" method="post" action="check.html">
  <input name="submit" type="image" value="" src="images/login.jpg" class="login"/>
</form>

  设置图片底部对齐

.login{
width:112px;
height:28px;
border:0px;
cursor:pointer;
vertical-align:bottom;
}


3、表格边框重叠问题的解决方法

.table {
	border:1px solid #dedede;
	border-collapse:collapse;
	text-align: center;
}
.table1 td{ 
	border:1px solid #dedede;
}

4、form表单放到<td>中后撑破了单元格,解决办法:

form{
	padding:0px;
	margin:0px;
}


未完待续。。。。。


posted @ 2014-05-14 13:28  顿搜  阅读(3)  评论(0)    收藏  举报