一个express框架写的网站,一直用localhost测试是好的。但是通过ip访问就乱了。这是怎么造成的那?
找到原因了:是浏览器放大造成的
对于图如下:
localhost访问:
ip访问:
高洛峰2017-04-17 15:46:20
windows.location.href
Get the current URL and then display different elements.
高洛峰2017-04-17 15:46:20
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
高洛峰2017-04-17 15:46:20
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