2021-07-29 11:08:52 +08:00
|
|
|
|
---
|
|
|
|
|
title: 16-浏览器的兼容性问题
|
|
|
|
|
publish: false
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<ArticleTopAd></ArticleTopAd>
|
2017-07-18 13:24:34 +08:00
|
|
|
|
|
|
|
|
|
|
2017-08-17 19:35:13 +08:00
|
|
|
|
我们在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;
|
|
|
|
|
}
|
2021-07-29 11:08:52 +08:00
|
|
|
|
</style>
|
2017-08-17 19:35:13 +08:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div>
|
|
|
|
|
<img src="/Users/smyhvae/Dropbox/img/20170813_1143.jpg" alt="">
|
2021-07-29 11:08:52 +08:00
|
|
|
|
|
|
|
|
|
</div>
|
2017-08-17 19:35:13 +08:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
```
|