奇怪的水平滚动(strange horizontal scroll)
我有一个奇怪的水平滚动,奇怪,因为我有一个100%宽度的容器。 看看这个链接 ,看看我在说什么
I have a strange horizontal scroll, strange because I have a 100% width container. Take a look at this link to see what I'm talking about
最满意答案
从触发器中删除float和width 。
您的元素的width: 100% ,这会导致它们占据页面的整个宽度。 您正在为它们添加边框和填充,这会增加该宽度并使它们比页面更大。
Remove the float and width from the triggers.
Your elements have width: 100%, which causes them to occupy the entire width of the page. You're adding a border and padding to them, which adds to that width and makes them bigger than the page.
更多推荐
发布评论