Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
标签溢出手机屏幕左侧
我正试图让这个网站适用于移动设备:http ://whitehallrow.com/
幻灯片下的正文在我的黑莓上运行良好,但蓝丝带下的所有段落都在屏幕左侧。我用 CSS 尝试了许多不同的东西,例如边距、填充、宽度:100%、浮动、文本对齐 - 甚至没有任何改变。
我怎样才能解决这个问题?
从此代码中完全删除宽度(我认为它在您的 CSS 中的第 340 行左右)
.homeblurb { width: 480px; /* <- remove this value */ float: right; padding-right: 16px; }
因为你有一个固定width: 480px的那个p,并且有一个 padding-right,所以文本会跑出屏幕。尽量不要设置宽度,我在 chrome 中测试过,它可以工作。
width: 480px
p