csdn_forever_326 2017-06-02 12:26 采纳率: 50%
浏览 1344
已采纳

在W3Sshool学习HTML关于响应式web设计的疑问。

为什么下面这段能够实现 响应式web.

<!DOCTYPE html>

.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.


  • 写回答

1条回答 默认 最新

  • threenewbee 2017-06-02 15:49
    关注

    因为css使用了浮动,使得调整浏览器大小的时候,里面的div可以跟着适应大小的变化

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料