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.
当您使用宽浏览器窗口查看页面时,它看起来不错。如果调整窗口大小使其变窄,标题会突然下降 60 像素,这等于主体的 padding-top。为了制作这个页面,我从一个简单的 Bootstrap 模板开始,去掉了大部分内容。为什么会这样?
事实证明,问题在于自定义主体 css 需要位于 bootstrap.css 文件之前:
<style type="text/css"> body { padding-top: 60px; padding-bottom: 40px; } </style> <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.0/css/bootstrap-combined.min.css" rel="stylesheet">