<html> | |
<head> | |
<title> new document </title> | |
<meta name="author" content="胡超" /> | |
<meta charset="utf-8"/> | |
<style type="text/css">/*解决div里插入img下边缝隙问题 | |
1.容器div font-size:0px; | |
2.img设置vertical-align:middle top bottom; | |
3.img设置display:block; | |
*/ | |
div{ | |
border:1px solid red; | |
font-size:0px; | |
} | |
img{ | |
border:1px solid black; | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<img src="images/airplane2.png"> | |
<div> | |
</body> | |
</html> |