Fluid layouts with CSS

后端 未结 4 1215
不思量自难忘°
不思量自难忘° 2021-01-01 00:50

I have noticed on some sites that utilise a fluid layout, it is possible to remove elements on the page and replace elements when the window is shrunk to a smaller size, obv

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 01:11

    The stylesheet contains different rules for when the screen is less than 800px wide. If you look at the stylesheet for the page the on line 983 there is a @media rule as follows:

    @media screen and (max-width: 800px) {
      /* Alternate rules here*/
    }
    

    This is a CSS3 feature so I guess that the site does not restyle as nicely for older browsers. Details of media queries can be seen at http://www.w3.org/TR/css3-mediaqueries/#width

提交回复
热议问题