CSS3应用border

2021-01-20 08:06 jianzhan

html


拷贝编码
编码以下:

<link href="test.css" type="text/css" rel="stylesheet" />
<meta http-equiv="Content-Type" content="text/html; charset=utf⑻" />
<div class="loginbox">
<h2>电子邮箱登陆</h2>
<ul>
<li><input type="text" value="电子邮箱账户" class="account" /><input type="button" value="" class="mail_btn" /></li>
<li><input type="text" value="登陆密码" /></li>
</ul>
</div>

应用border-radius特性,制做圆角


拷贝编码
编码以下:

/*CSS3.0圆角特性完成表模块素圆角*/
.loginbox{
  background:#edf6ff;
  border-left:1px solid #acc3e3;
  border-right:1px solid #acc3e3;
  padding:20px;
}
.loginbox h2{
  color:#28456f;
  font-size:14px;
}
.loginbox ul{
  margin-top:10px;
}
.loginbox li{
  margin-bottom:10px;
  list-style-type:none;
}
.loginbox li input{
  border:1px solid #9dadc6;
  border-radius:6px;
  height:32px;
  padding:0 5px;
  color:#888;
  width:292px;
}
.loginbox li input.account{
  width:182px;
  border-right:1px solid #d5deed;
  border-top-right-radius:0;
  border-bottom-right-radius:0;
  background:-moz-linear-gradient( top,#ddd 0%,#eee 10%,#fff 20%);
  background:-webkit-linear-gradient( top,#ddd 0%,#eee 10%,#fff 20%);
  background:-ms-linear-gradient( top,#ddd 0%,#eee 10%,#fff 20%);
}
.loginbox li input.mail_btn{
  width:110px;
  height:34px;
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  color:#504c4d;
  text-align:left;
  cursor:pointer;
}

编码很简约,实际效果却很棒,CSS3你值得有着!!!!