search

Home  >  Q&A  >  body text

css - 通过localhost和ip访问页面,显示不同

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

ip访问:

巴扎黑巴扎黑2868 days ago615

reply all(6)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:46:20

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

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 15:46:20

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

    reply
    0
  • 高洛峰

    高洛峰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

    reply
    0
  • 高洛峰

    高洛峰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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 15:46:20

    Are the browsers the same?

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 15:46:20

    Is it resolved? It should be a cache issue.

    reply
    0
  • Cancelreply