盒子模型:
margin:外边距
border:边框
pading:内边距
元素本身
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>盒子模型</title>
<style>
body{
margin: 0 0 0 0;
}
#d1{
width: 300px;
border: #32c735 solid 5px;
}
#登录{
font-size: 30px;
}
#d2{
background: orange;
}
/*margin:外边距
margin:0 0 0 0 顺时针:上右下左
*/
span:nth-child(1){
margin: 0 0 0 0;
padding: 0 0 0 0 ;
}
</style>
</head>
<body>
<div id="d1">
<span id="登录">登录</span>
<div id="d2">
<form action="">
<span>账号</span>
<input type="text"><br>
<span>密码</span>
<input type="text">
</form>
</div>
</div>
</body>
</html>
标签:盒子,14,登录,border,模型,margin
From: https://www.cnblogs.com/zhanjianhai/p/17715793.html