Responsive Web Design Fundamentals

这个是谷歌响应式网页设计公开课的笔记。

Lession 2 - Starting Small

Pixels, pixels and moar pixels!

DIP and Hardware Pixels
DPI
Pixelation Quiz
Calculating DPR(Device Pixel Ratio) Quiz
What's the difference? Quiz
Calculating CSS Pixels Quiz
How wide is the viewport?

Setting the Viewport

If you don't set the viewport, the browser will determine the viewport size:

Default Viewport Sizw
<meta name="viewport" content="width=device-width, initial-scale=1.0">

The width property controls the size of the viewport. It can be set to a specific number of pixels like width=600 or to the special value device-width value which is the width of the screen in CSS pixels at a scale of 100%. (There are corresponding height and device-height values, which may be useful for pages with elements that change size or position based on the viewport height.)

The initial-scale property controls the zoom level when the page is first loaded. The maximum-scale, minimum-scale, and user-scalable properties control how users are allowed to zoom the page in or out.

Max-width elements

img,embed,object,video{
    max-width: 100%;
}
Relative Sizes Quiz

New Words

pan and zoom  平移和缩放
cater  迎合
density  密度
caveat  警告
rumoured  谣传的

References

移动前端开发之viewport的深入理解
Using the viewport meta tag to control layout on mobile browsers
A pixel is not a pixel is not a pixel

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1 概述 linux的作业有两个方式,一个是工作于前台,一个是工作于后台 前台作业:通过终端启动,且启动后一直占据...
    ghbsunny阅读 888评论 0 0