随着页面变窄,这种流体列布局如何变为单列?
有人可以解释一下 http://cssgrid.net/ 是如何实现当浏览器宽度低于一定值时,布局从 3 列切换为单列?
我尝试关闭 javascript,并检查 .row
和 .container
的 CSS,但我缺乏 CSS 知识。有一个 min-width
属性,但通过 Firebug 更改它似乎没有太大影响。
有人能指出 CSS 中的什么导致了这种变化吗?
Can someone explain how http://cssgrid.net/ achieves the effect that when the browser width is below a certain amount, the layout switches from 3-column to single-column?
I've tried turning off javascript, and inspecting the CSS of .row
and .container
but my knowledge of CSS is lacking. There's a min-width
property but changing it via Firebug doesn't seem to affect much.
Could someone point out what in the CSS is causing the change?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 主 CSS 底部的媒体查询:
它们根据浏览器尺寸应用不同的规则,并由针对旧版浏览器的 JS 类 提供帮助。
It's the media queries at the bottom of the main CSS:
These apply different rules based on the browser dimensions, and are helped out by a JS class for older browsers.
@本;为此需要使用
mediaqueries
。这是一个新属性,我们根据宽度定义 css。像这样:在上面的示例中,
apx.css
是您的默认 css &当屏幕宽度减小到 600 像素时,new-css.css
应用。这是您答案的最佳链接 http://css-tricks.com/6206-resolution -specic-stylesheets/
检查此了解更多http://webdesignerwall.com/tutorials/css3-media-queries
@ben; for this need to use
mediaqueries
.It's new property in which we define the css according to the width. Like this:In the above example the
apx.css
is your default css & andnew-css.css
apply when your screen width decrease to 600px.That a best link for your answer http://css-tricks.com/6206-resolution-specific-stylesheets/
Check this for more http://webdesignerwall.com/tutorials/css3-media-queries