init
This commit is contained in:
50
Html-Css/07-外边距.html
Normal file
50
Html-Css/07-外边距.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width-device-width,initial-scale=1.0">
|
||||
<title>外边距 </title>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
background-color: orangered;
|
||||
|
||||
/* No.1 设置内边距*/
|
||||
padding-top: 1px;
|
||||
|
||||
/* No.2 边框 */
|
||||
border: solid 1px pink;
|
||||
}
|
||||
.box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: lightseagreen;
|
||||
|
||||
margin-top: 100px;
|
||||
|
||||
|
||||
/* 块盒子的margin上下穿透问题 , 左右不存在*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
123
|
||||
<div class="box"> </div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user