-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
111 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>margin合并</title> | ||
</head> | ||
<style> | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.one{ | ||
background-color: hsl(346.8 77.2% 49.8%); | ||
height: 20px; | ||
margin-bottom: 100px; | ||
overflow: hidden; | ||
} | ||
.two{ | ||
background-color: hsl(262.1 83.3% 57.8%); | ||
height: 20px; | ||
margin-top: 100px; | ||
} | ||
/* .wrap { | ||
overflow: hidden; | ||
}*/ | ||
</style> | ||
<body> | ||
<div>解决方法:解开注释</div> | ||
<div class="one"></div> | ||
<!-- <div class="wrap"></div> --> | ||
<div class="two"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>margin塌陷</title> | ||
</head> | ||
<style> | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.father{ | ||
width: 200px; | ||
height: 200px; | ||
background-color: hsl(0 72.2% 50.6%); | ||
margin-top: 100px; | ||
/* overflow: hidden;*/ | ||
} | ||
.son{ | ||
width: 100px; | ||
height: 100px; | ||
background-color: hsl(221.2 83.2% 53.3%); | ||
margin-top: 150px; | ||
} | ||
</style> | ||
<body> | ||
<div>解决方法:解开注释</div> | ||
<div class="father"> | ||
<div class="son"></div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>BFC</title> | ||
</head> | ||
<style> | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.box { | ||
width:200px; | ||
border: 1px solid #000; | ||
} | ||
.zhanan { | ||
width: 50px; | ||
height: 50px; | ||
background: yellow; | ||
float: left; | ||
} | ||
.info { | ||
background: #f1f1f1; | ||
color: #222; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<body> | ||
<div class="box"> | ||
<div class="zhanan">渣男</div> | ||
<p class="info">资产100000000,上海三套房,劳斯莱斯两辆,上市公司CEO,肖战相貌,彭于晏身材,只爱你一个人...</p> | ||
</div> | ||
</body> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>BFC</title> | ||
</head> | ||
<style> | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.box { | ||
width:200px; | ||
border: 1px solid #000; | ||
} | ||
.zhanan { | ||
width: 50px; | ||
height: 50px; | ||
background: yellow; | ||
float: left; | ||
} | ||
.info { | ||
background: #f1f1f1; | ||
color: #222; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<body> | ||
<div class="box"> | ||
<div class="zhanan">渣男</div> | ||
<p class="info">资产100000000,上海三套房,劳斯莱斯两辆,上市公司CEO,肖战相貌,彭于晏身材,只爱你一个人...</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters