简体   繁体   English

Chrome 开发者工具在更改屏幕宽度时截断页面

[英]Chrome Developer Tools Cut Off Page When Changing Screen Width

When inspecting my webpage and trying to resize the screen width for responsive designing it begins to cut my website on anything lower than about 1340px.当检查我的网页并尝试调整屏幕宽度以进行响应式设计时,它开始将我的网站剪切到低于 1340 像素的任何位置。 See link for photo.请参阅照片链接。 Screen Width In Chrome Developer Tools Not Working Chrome 开发者工具中的屏幕宽度不起作用

I think this may help you https://www.w3schools.com/css/css_rwd_mediaqueries.asp you need to create different styles for each resolutions im not sure if you done it already but this should help you我认为这可能对您有所帮助https://www.w3schools.com/css/css_rwd_mediaqueries.asp您需要为每个分辨率创建不同的样式我不确定您是否已经这样做了,但这应该可以帮助您

in that's how i make my projects responsive这就是我如何让我的项目响应

you may need to make a new background image with each new screen size but that is easy just download gimp and resize the image make sure that you resize it in a way that it doesn't stretch您可能需要为每个新的屏幕尺寸制作一个新的背景图像,但这很容易,只需下载 gimp 并调整图像大小,确保以不拉伸的方式调整其大小

This was one of my first websites and I actually ran into this same issue a couple years later during the front-end bootcamp I attended.这是我的第一个网站之一,几年后在我参加的前端训练营期间,我实际上遇到了同样的问题。 As I was more experience by then it was easier to find the element causing the issue.由于那时我的经验更多,因此更容易找到导致问题的元素。 If you're not sure what styling may be causing this, you can inspect in the dev tools, and in the elements tab you select a parent element and use the arrow keys (Right & Down) to navigate through the DOM.如果您不确定是什么样式导致了这种情况,您可以在开发工具中检查,并在元素选项卡中 select 父元素并使用箭头键(向右和向下)在 DOM 中导航。 This will eventually highlight your trouble element's styling issue (You'll see it extending past the media query that everything else is adhering to) and you can fix it accordingly.这最终会突出显示您的麻烦元素的样式问题(您会看到它延伸到媒体查询之外,其他所有内容都遵循)并且您可以相应地修复它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM