mirror of
https://github.com/qianguyihao/Web.git
synced 2024-11-01 21:44:45 +08:00
30 lines
465 B
Markdown
30 lines
465 B
Markdown
|
||
|
||
我们在div里放一个img,发现:
|
||
|
||
在html和html5中,div的长宽是不同的,后者的高度要超过几个像素。
|
||
|
||
比如说,下面这个是html的。
|
||
|
||
```html
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>Document</title>
|
||
<style type="text/css">
|
||
*{
|
||
margin: 0px;
|
||
padding: 0px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div>
|
||
<img src="/Users/smyhvae/Dropbox/img/20170813_1143.jpg" alt="">
|
||
|
||
</div>
|
||
</body>
|
||
</html>
|
||
```
|