什么是响应式 Web 设计?
RWD 指的是响应式 Web 设计(Responsive Web Design)
RWD 能够以可变尺寸传递网页
RWD 对于平板和移动设备是必需的
简单的讲,就是说,里面的内容可以根据窗口的大小,自动布局。
下面是一段响应式自动布局的代码:
自已可以把写出来,然后改变浏览器窗口的大小,看看效果如何
.city {
float: left;
margin: 5px;
padding: 15px;
width: 300px;
height: 300px;
border: 1px solid black;
}
W3School Demo
Resize this responsive page!
London
London is the capital city of England.
It is the most populous city in the United Kingdom,
with a metropolitan area of over 13 million inhabitants.
Paris
Paris is the capital and most populous city of France.
Tokyo
Tokyo is the capital of Japan, the center of the Greater Tokyo Area,
and the most populous metropolitan area in the world.