当前位置: 代码迷 >> Web开发 >> 如何使用css统一输入框的大小,位置
  详细解决方案

如何使用css统一输入框的大小,位置

热度:111   发布时间:2012-02-15 12:09:44.0
怎么使用css统一输入框的大小,位置 - Web 开发 / 其他
怎么使用css统一输入框的大小,位置

------解决方案--------------------
<style type="text/css">
.input1{
font-family: verdana;background-color: #ffffff;border: #000000 1px solid;border-left: #000000 1px solid;border-right: #000000 1px solid;border-top: #000000 1px solid;font-size: 20px;
}
.input1-bor {
font-family:verdana;background-color:#F0F8FF;font-size: 20px; 

border: 1px solid #333333;}
</style>

<p class="top clearfix">
<label for="email">帐号:</label>
<input size=20 name=email class="input1" onblur="this.className='input1'" onfocus="this.className='input1-bor'">
</p>
------解决方案--------------------
HTML code
<!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=utf-8" />
<title>无标题文档</title>
<style>
    input{width:100px; height:20px;}
</style>
</head>

<body>
    <input type="text" /><br />
    <input type="text" /><br />
    <input type="text" />


</body>
</html> 
  相关解决方案