我有一个空(样板文件html)index.html
文件,其格式如下:
html {
width: 100%;
overflow: hidden;
}
如果我从服务器提供文件或直接从硬盘驱动器打开文件,则html
标记的宽度是正确的。
文件:///var/www/html/foobar1/index.html
somedomain.com/index.html
宽度 1280px
如果我启动Apache服务器或Python服务器并访问包含文件夹
本地主机/ foobar1
宽度 1163.636px
document.getElementsByTagName('html')[0].clientWidth
1163
document.getElementsByTagName('html')[0].offsetWidth
1164
Chrome Version 42.0.2311.135 (64-bit)
在Ubuntu 14.04.2
在Firefox中不会发生这种情况。这是一个错误还是我错过了某种配置?
index.html
:https://gist.github.com/givanse/ed850a0983d53c766d2f
到目前为止,我有:
没有骰子
答案 0 :(得分:1)
我找不到罪魁祸首,最后做了:
sudo apt-get remove google-chrome
rm -r ~/.config/google-chrome/
然后重新安装。