盒子模型的边框使用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
/*h1,ul,li,a,body{*/
/* !*body总有一个默认的外边距margin:0,如果不设置为0的话页面就会空出一部分区域*!*/
/* margin: 0;*/
/* padding: 0;*/
/* text-decoration: none;*/
/*}*/
#box{
width: 300px;
border: 1px solid red;
}
h2{
font-size: 16px;
background: #b1bb20;
line-height: 30px;
color: #c6267e;
}
form{
background: aquamarine;
}
div:nth-of-type(1) input{
/*solid实线*/
border: 3px solid black;
}
div:nth-of-type(2) input{
/*dashed虚线*/
border: 3px dashed black;
}
div:nth-of-type(3) input{
border: 3px dashed pink;
}
</style>
</head>
<body>
<div id="box">
<h2>会员登陆</h2>
<form action="#">
<div>
<span>用户名:</span>
<input type="text">
</div>
<div>
<span>密码:</span>
<input type="text">
</div>
<div>
<span>邮箱:</span>
<input type="text">
</div>
</form>
</div>
</body>
</html>
内外边距
圆角边框
盒子阴影