Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html IE显示的div大小不正确_Html_Internet Explorer - Fatal编程技术网

Html IE显示的div大小不正确

Html IE显示的div大小不正确,html,internet-explorer,Html,Internet Explorer,为什么IE中的这个div显示为30像素(用Photoshop测量) 在所有其他浏览器中,它正确显示29像素 <div style="width:29px;height:18px;background-color:Black;"></div>​ ​ 添加显示:块到您的样式,然后刷新。。。它可能会起作用是的,默认情况下div是一个块,但我怀疑IE没有将其渲染为一个块。您的doctype是什么?…可能与

为什么IE中的这个div显示为30像素(用Photoshop测量) 在所有其他浏览器中,它正确显示29像素

<div style="width:29px;height:18px;background-color:Black;"></div>​

添加
显示:块到您的样式,然后刷新。。。它可能会起作用

是的,默认情况下div是一个块,但我怀疑IE没有将其渲染为一个块。您的doctype是什么?…可能与