mirror of
https://github.com/qianguyihao/Web.git
synced 2024-11-01 13:34:46 +08:00
36 lines
553 B
Markdown
36 lines
553 B
Markdown
---
|
||
title: 16-浏览器的兼容性问题
|
||
publish: false
|
||
---
|
||
|
||
<ArticleTopAd></ArticleTopAd>
|
||
|
||
|
||
我们在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>
|
||
```
|