*{ margin:0px; padding:0px;}
h1{ font:bold 20px verdana,sans-serif;}
h1{ font:bold 14px verdana,sans-serif;}
header,section,footer,aside,nav,article,figure,figcaption,hgroup{ display:block;}
body{ text-align:center;}
#wrapper{ width:960px; margin:15px auto; text-align:left; }
#main_header{ background:#FFFBB9; border:1px solid #999999; padding:20px;}
#main_menu{ background:#ccccc; padding:5px 15px;}
#main_menu li{ display:inline-block; list-style:none; padding:5px; font:bold 14jpx verdana,sans-serif;}
#main_section{ float:left; width:660px; margin:20px;}
#main_aside{ float:left; width:220px; margin:20px 0px; padding:20px; background:#cccccc;}
#main_footer{ clear:both; text-align:center; padding:20px; border-top:2px solid #999999;}

  

article{ background:#fffbcc; border:1px solid #999999; padding:20px; margin-bottom:15px;}
article footer{ text-align:right;}
time{color:#999999;}
figcaption{ font:italic 14px verdana,sans-serif;}
/*
p:nth-child(odd)
{
background:#999999;
} p:nth-child(even)
{
background:#CCCCCC;
} p:nth-child(3)
{
background:#999999;
} :not(p)
{
background:#990000;
}*/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="This is an HTML5 example">
<meta name="keywords" content="HTML5, CSS3, JavaScript">
<title>This text is the title of the document</title>
<link href="../CSS/mysheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<header id="main_header">
<h1>This is the main title of the website</h1>
  </header>
<nav id="main_menu">
<ul>
  <li>home</li>
  <li>photos</li>
  <li>videos</li>
  <li>contact</li>
</ul>
  </nav>
<section id="main_section">
<article>
  <header>
<hgroup>
  <h1>Title of post One</h1>
  <h2>subtitle of the post One</h2>
</hgroup>
<time datetime="2011-12-10" pubdate>posted 12-10-2011</time>
  </header>
  This is the text of my first post
  <figure>
<img src="../Images/QQ截图20141204125827.png" />
<figcaption>
  this is the image of the first post
</figcaption>
  </figure>
  <footer>
<p>comments (0)</p>
  </footer>
</article>
<article>
  <header>
<hgroup>
  <h1>Title of post Two</h1>
  <h2>subtitle of the post Two</h2>
</hgroup>
<time datetime="2011-12-15" pubdate>posted 12-15-2011</time>
  </header>
  This is the text of my second post
  <footer>
<p>comments (0)</p>
  </footer>
</article>
  </section>
<aside id="main_aside">
<blockquote>Article number one</blockquote>
<blockquote>Article number two</blockquote>
  </aside>
<!-- 文档正文结尾-->
<footer id="main_footer"> Copyright &copy 2010-2011 </footer>
</div>
</body>
</html>
/*弹性框模型*/
*{ margin:0px; padding:0px;}
h1{ font:bold 20px verdana,sans-serif;}
h1{ font:bold 14px verdana,sans-serif;}
header,section,footer,aside,nav,article,figure,figcaption,hgroup{ display:block;}
body{ width:100%; display:-moz-box; display:-webkit-box; -moz-box-pack:center;-webkit-box-pack:center;}
#wrapper{ width:960px; margin:15px auto; display:-moz-box; display:-webkit-box; -moz-box-orient:vertical;-webkit-box-orient:vertical; -moz-box-flex:; -moz-box-flex:;}
#main_header{ background:#FFFBB9; border:1px solid #999999; padding:20px;}
#main_menu{ background:#ccccc; padding:5px 15px;}
#main_menu li{ display:inline-block; list-style:none; padding:5px; font:bold 14jpx verdana,sans-serif;} #container{ display:-moz-box; display:-webkit-box; -moz-box-orient:horizontal;-webkit-box-orient:horizontal;} #main_section{ -moz-box-flex:; -moz-box-flex:; margin:20px;}
#main_aside{ width:220px; margin:20px 0px; padding:20px; background:#cccccc;}
#main_footer{ clear:both; text-align:center; padding:20px; border-top:2px solid #999999;}
article{ background:#fffbcc; border:1px solid #999999; padding:20px; margin-bottom:15px;}
article footer{ text-align:right;}
time{color:#999999;}
figcaption{ font:italic 14px verdana,sans-serif;}

目前没有浏览器支持 box-flex 属性。

Firefox 支持替代的 -moz-box-flex 属性。

Safari、Opera 以及 Chrome 支持替代的 -webkit-box-flex 属性。

简单的网页结构出来了

html5(二)的更多相关文章

  1. 基于html5二个div 连线

    因为要实现拖拽连线研究了一下基于extjs 和html5的不同实现方法 extjs底层的画图引擎是svg 不知道在html5大潮即将袭来的前夕一贯走在技术前沿的extjs开发团队没有自己封装基于htm ...

  2. HTML5常识总结(一)

    一.HTML5的发展历程 + html演变的几个版本: html2.0.html3.2.html4.0.html4.01.html5. + 其中在html4.01发布之后,还发布了xtml1.0,它是 ...

  3. 小强的HTML5移动开发之路(1)——HTML介绍

    来自:http://blog.csdn.net/dawanganban/article/details/17591373 HTML是HyperText Markup Language(超文本标记语言) ...

  4. 用Html5制作的一款数学教学程序Function Graphics(绘制函数图的程序)

    最近我不仅对游戏开发感兴趣,还对函数图感兴趣,特此我开发了这个程序.以下是一些介绍和下载演示地址,喜欢的朋友可以看看: 一,产品名片 产品名:Function Graphics 版本: 0.1 开发者 ...

  5. Angularjs中的缓存以及缓存清理

    写在最前面:这篇博文是2篇文章组成,详细介绍了Angularjs中的缓存以及缓存清理,文章由上海尚学堂转载过来,欢迎大家阅读和评论.转载请注明出处,谢谢! 一个缓存就是一个组件,它可以透明地储存数据, ...

  6. springboot+mybatis+thymeleaf项目搭建及前后端交互

    前言 spring boot简化了spring的开发, 开发人员在开发过程中省去了大量的配置, 方便开发人员后期维护. 使用spring boot可以快速的开发出restful风格微服务架构. 本文将 ...

  7. Thymeleaf的基本用法

    俗话说,不会前端的后端工程师不是一个合格的程序员.因为在项目中经常要和前端工程师打交道,并且偶尔也会涉及前端的简单开发,因此在闲暇之余学习了一点前端的知识,今天首先总结归纳一下 Thymeleaf 模 ...

  8. HTML5 学习总结(二)——HTML5新增属性与表单元素

    一.HTML5新增属性 1.1.contextmenu contextmenu的作用是指定右键菜单. <!DOCTYPE html> <html> <head> & ...

  9. Web 前端开发精华文章推荐(jQuery、HTML5、CSS3)【系列十二】

    2012年12月12日,[<Web 前端开发人员和设计师必读文章>系列十二]和大家见面了.梦想天空博客关注 前端开发 技术,分享各种增强网站用户体验的 jQuery 插件,展示前沿的 HT ...

  10. HTML5 学习笔记(二)——HTML5新增属性与表单元素

    目录 一.HTML5新增属性 1.1.contextmenu 1.2.contentEditable 1.3.hidden 1.4.draggable 1.5.data-* 1.6.placehold ...

随机推荐

  1. linux 通过pid 寻找程序路径的最简单命令(pwdx)

    在linux实际操作命令中,查看pid的方式有很多种,通过pid找程序路径的方式也有好几个,但是可能大家都忽略的一个很简单也是很实用的命令:pwdx. 比如要查找某个java编写的程序运行情况可通过j ...

  2. 师兄带你轻松入门GitHub

    小白:师兄,师兄,我最近总是听到Github,看起来好高大上那,可是不懂是做什么得那? 师兄:你知道微博吧,Github就是程序员的微博,你可以在这里看到全世界最优秀的程序员在做什么. 小白:师兄就是 ...

  3. 解析web应用处理流程

    客户端(浏览器.app.ajax.爬虫程序)通过域名(dns绑定)向服务器发送http协议,域名可以泛解析到机群.机器,服务器接收http请求报文,通过WSGI协议链接框架做代码逻辑层的处理,解析完逻 ...

  4. windows将文件夹映射为虚拟磁盘

    subst X: e:123 将e盘下的123文件夹映射为x盘,123的容量即x盘容量 subst X: /t 删除映射的x盘

  5. 关于table的td和ul元素li隔行变色的功能实现

    table元素的td和ul元素li隔行变色的功能实现 利用css控制二者的样式轻松实现隔行换色: 例如:table的css样式控制: table tr td{   background-color:颜 ...

  6. DUBBO分布式入门

    Dubbox框架简介: Dubbox是一个分布式服务框架,其前身是阿里巴巴开源项目Dubbo,被国内电商及互联网项目广泛使用,但是后阿里巴巴对该项目停止维护了,当当网后来组建了一个团队一直维护Dubb ...

  7. .net基本面试题

    OOP: Object Oriented Programming: 面向对象编程技术的关键性观念是它将数据及对数据的操作行为放在一起,作为一个相互依存.不可分割的整体——对象.对于相同类型的对象进行分 ...

  8. javascript Template tmpl

    前两天写前端遇到很多table 和 表单需要拼接的问题 , 一堆的字符串 , 页面显得冗长,又不好维护.于是有了下文. 话不多说,上代码: 首先引用一个js文件: <script src=&qu ...

  9. mysql-5.7.17-winx64压缩版的安装包下载和安装配置

    网上有很多的安装配置步骤,但是一个跟一个遇到的问题不一样,总之越是写的完整的人,遇到的错误越多,在安装过程中也就越悲催!第一步:下载mysql安装包---下载网址https://downloads.m ...

  10. Log4j配置记录

    log4j的配置文件就是用来设置记录器的级别.存放器和布局的,它可接key=value格式的设置或xml格式的设置信息.通过配置,可以创建出Log4J的运行环境. 1.配置文件 log4j配置文件的基 ...