css - 通过localhost和ip访问页面,显示不同
巴扎黑
巴扎黑 2017-04-17 15:44:20
0
6
587

一个express框架写的网站,一直用localhost测试是好的。但是通过ip访问就乱了。这是怎么造成的那?
找到原因了:是浏览器放大造成的
对于图如下:
localhost访问:

ip访问:

巴扎黑
巴扎黑

reply all(6)
Ty80

It turned out to be caused by the browser’s magnified display

小葫芦

windows.location.hrefGet the current URL and then display different elements.

小葫芦

It’s best if you can post the relevant code, such as the css and js references of this page, as well as the background code related to this

小葫芦

My personal feeling is that the css is not loaded. It is recommended that the server uses node to start the project, open the web page and then check whether the css is loaded on the server side

GET /stylesheets/style.css 200 216ms - 2.8kb
Peter_Zhu

Are the browsers the same?

大家讲道理

Is it resolved? It should be a cache issue.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template