初入响应式布局_第1页
初入响应式布局_第2页
初入响应式布局_第3页
初入响应式布局_第4页
初入响应式布局_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1:媒体查询模块Media Queries; (例子)<!doctype html><html><head><meta charset="utf-8"><title>响应式布局(media querys)</title><style>body,h2 margin:0; padding:0; color:#fff;section#main,header,aside,footer background:#333; margin:5px 0; h2 text-align:center; font-

2、size:3em; section#container margin:0 auto; width:960px; header float:left; width:100%; line-height:100px; footer float:left; width:100%; line-height:80px; #left float:left; width:200px; line-height:400px ; width:200px; section#main float:left; width:540px; line-height:400px; margin-left:10px; #right

3、 float:right; width:200px; line-height:400px ; width:200px; media screen and (min-width:1000px) h2 color:#FF0; font-size:4em; section#container width:1160px; section#main width:640px; #right width:300px; line-height:400px; media screen and (min-width:640px) and (max-width:1000px)h2 color:#F0F; font-

4、size:2.5; section#container width:600px; #left width:160px; section#main width:430px; #right display:none; media screen and (max-width:639px) h2 color:green; font-size:1.5em; section#container width:400px; #left float:left; width:100%; line-height:100px ; section#main float:left; width:100%; line-he

5、ight:200px; margin-left:0; #right float:left; width:100%;line-height:100px ; </style></head><body><section id="container"> <header><h2>header</h2></header> <aside id="left"><h2>left</h2></aside> <section i

6、d="main"><h2>main</h2></section> <aside id="right"><h2>right</h2></aside> <footer><h2>footer</h2></footer></section></body></html>2.媒体查询的使用方法3:语法结构4;外部样式引用4;可用设备类型5:设备参数6;苹果的设备二:内容设计(图片,文字等)背景:对于过大的图片,使用多张图片是比较合理的;Img加载图片:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论