abstract: <!-- CSS盒模型——邊框(border) --> <!DOCTYPE html><head> <meta charset="UTF-8"> <title>學(xué)習(xí)css第三節(jié)課 —— CSS邊框</title> <link rel="short
<!--
CSS盒模型——邊框(border)
-->
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>學(xué)習(xí)css第三節(jié)課 —— CSS邊框</title>
<link rel="shortcut icon" type="image/x-icon" href="../Public/images/2.1.png">
<!-- 外部樣式 -->
<link rel="stylesheet" type="text/css" href="../Public/css/2.1.css">
<!-- 內(nèi)部樣式 -->
<style type="text/css">
/*
復(fù)合寫法 border: 1px solid #ccc; 線的大小 線的類型(solid 實線 double 雙線 dashed 線狀虛線 dotted 點狀虛線) 線的顏色
設(shè)置圓角 border-radius: 10px; 正方形如若設(shè)置直徑的一半 則變成圓
*/
.box{width: 100px;height: 100px; border: 1px solid #ccc; border-radius: 50px;}
/*
單邊邊框
border-top:1px solid red;
border-bottom:1px solid red;
border-left:1px solid red;
border-right:1px solid red;
*/
.main{width: 100px;height: 100px;border-top:1px solid red;background: #ccc;margin-top: 10px;}
/* 清除邊框 */
button{border: none;}
/* box-shadow:10px 5px 3px #ccc; x軸方向的陰影位置 y軸方向的陰影位置 陰影寬度(數(shù)值越大會形成光暈效果) 陰影顏色 inset(可選參數(shù) 效果:陰影向內(nèi))*/
.shadow{width: 300px;height: 40px;box-shadow:0px 0px 10px #ccc inset;border:1px solid #ccc;}
</style>
</head>
<body>
<div class="box"></div>
<div class="main"></div>
<button>登錄</button>
<div class="shadow"></div>
</body>
</html>
Correcting teacher:天蓬老師Correction time:2019-03-25 09:23:33
Teacher's summary:在盒模型中, 只有邊框的設(shè)置是最復(fù)雜的, 因為內(nèi)外邊距都是透明的, 只有寬度, 沒有樣式, 而邊框除了寬度外, 是有樣式的