问题
I am creating a dev. site to eventually replace an existing site and every time I inspect an element the body of the page shrinks down to a third of the left half of the page. It is also happening randomly with the slider where the image shows on only half the page from time to time. If I refresh the page it corrects it until I inspect an element again. It is making it impossible to work on this site and I have disabled the theme and gone to a stock theme as well as one by one disabled plugins trying to figure out what is causing this glitch and I have yet to determine what could be causing this issue. How can I fix it?
回答1:
If you're using chrome dev tools (assuming the dev-tools window opens separate from chrome, not in the same window) my guess is that your device toolbar may be toggled.
Click this to turn it off, as it's used to test your site on a different screen sizes and could be shrinking your screen whenever you inspect something.
回答2:
It's possible that you have your Dev tools Emulator on which helps you emulate the web page in different device sizes. Try closing the emulator by clicking on it.
来源:https://stackoverflow.com/questions/50357960/chrome-dev-tool-shrinks-screen-when-inspecting-an-element