摘要:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>CSS邊框</title><style type="text/css">.box{width: 500px;height:500px;border-top: 2px
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS邊框</title>
<style type="text/css">
.box{
width: 500px;
height:500px;
border-top: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ blue;
border-left: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ green;
border-bottom: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ yellow;
border-right: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ red;
border-radius/*圓角*/: 40%;
display: flex;
}
.box1{
width: 400px;
height: 400px;
border-top: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ red;
border-left: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ blue;
border-bottom: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ green;
border-right: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ yellow;
display: flex;
margin: auto auto;
border-radius: 35%;
}
.box2{
width: 300px;
height: 300px;
border-top: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ yellow;
border-left: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ red;
border-bottom: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ blue;
border-right: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ green;
display: flex;
margin: auto auto;
border-radius: 30%;
}
.box3{
width: 200px;
height: 200px;
border-top: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ green;
border-left: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ yellow;
border-bottom: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/red;
border-right: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ blue;
display: flex;
margin: auto auto;
border-radius: 25%;
}
.box4{
width: 100px;
height: 100px;
border-top: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ blue;
border-left: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ green;
border-bottom: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ yellow;
border-right: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)*/ red;
display: flex;
margin: auto auto;
border-radius: 20%;
}
.box5{
height: 20px;
/*border-top: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線) blue;
border-left: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)green;
border-bottom: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線)yellow;
border-right: 2px solid/*doyble(雙線);dashed(虛線);dotted(點線) red; */
box-shadow:0px/*(X方向位置)*/ 2px/*(Y方向位置)*/ 5px/*(陰影寬度)*/ pink/*(顏色)*/;
margin: auto auto;
}
button{
border: none;
margin: auto auto;
}
</style>
</head>
<body>
<div class="box">
<div class="box1">
<div class="box2">
<div class="box3">
<div class="box4">
<button class="box5">登陸</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
批改老師:天蓬老師批改時間:2019-06-24 09:32:29
老師總結(jié):邊框?qū)俸心P椭械囊粋€重要的樣式, 也是一個復(fù)合屬性, 對于設(shè)置元素外觀很有用