本文介绍了页面宽度超过屏幕宽度的100%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,我在设计一个页面,完成后,发现在页面的底部有一个水平滚动条,我检查了页面html,但发现有一个关闭标签为每个标签。

I have a strange problem, I was designing a page and after I finished, found that there is a horizontal scroll bar in the bottom of the page, I checked the page html but found that there is a close tag for each tag.

此外,我尝试使用jQuery检查宽度,发现
$(window).width()= 1351px

$(document).width()= 1480px

Also I tried to check the widths using jQuery and found that$(window).width() = 1351pxand$(document).width() = 1480px

有关此问题的原因的任何建议?

any suggestions about what reason for this problem ?

推荐答案

使用您的Web检查器,通过和删除内部元素,直到滚动条消失。然后修正该元素的宽度(float:left可能工作)。可能发生的是有一个元素对于页面太宽。它不会破坏任何东西,它只是导致滚动条。

Using the your web inspector go through and delete interior elements until the scroll bar goes away. Then fix the width for that element (float:left may work). Probably what is happening is there is an element which is too wide for the page. It is not breaking anything, it is just causing the scroll bar.

这篇关于页面宽度超过屏幕宽度的100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 19:40
查看更多