父容器样式必须有定义:"{ display: -webkit-box }"
现象:水平时只能在一行布局,子容器在垂直方向上会填充父容器。
技巧:可以做水平居中和垂直居中。也可以实现经典的n列布局
说明:本文所用到的属性只在webkit内核的浏览器上做过测试

box-origin (horizontal)

The box-orient property specifies whether the children of a box should be laid out horizontally or vertically.

Children within a horizontal box are displayed from left to right, and children within a vertical box are displayed top to bottom. However, the box-direction and box-ordinal-group properties can change this ordering.

box-orient: horizontal|vertical|inline-axis|block-axis|inherit;
Default value: inline-axis

box-direction

The box-direction property specifies the direction in which child elements of a box element are laid out.
box-direction: normal|reverse|inherit;

reverse: Display the child elements in the reverse direction

Default value: normal

box-pack (水平方向)

The box-pack property specifies where child elements of a box are placed when the box is larger than the size of the children. This property specifies the horizontal position in horizontal boxes, and the vertical position in vertical boxes.
box-pack: start|end|center|justify;
Default value: start

box-align (垂直方向)

The box-align property specifies how to align the child elements of a box.
box-align: start|end|center|baseline|stretch;
Default value: stretch

box-flex (定义在子容器中)

The box-flex property specifies whether the child elements of a box is flexible or inflexible in size.

Elements that are flexible can shrink or grow as the box shrinks and grows. Whenever there is extra space in a box, flexible elements are expanded to fill that space.

box-flex: value;
Default value: 0.0 (indicates that the element is inflexible)

box-css3的更多相关文章

  1. CSS3入门

    CSS3 w3cschools css3  MDN英文  MDN中文 CSS3 is the latest evolution of the Cascading Style Sheets langua ...

  2. BFC(Box Formatting Context)的原理

    BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...

  3. 显示层封装及实现与优化(无动画+css3动画+js动画)

    showhide.html <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...

  4. 前端精选文摘:BFC 神奇背后的原理

    BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...

  5. 浅析CSS中的BFC和IFC

    1. 为什么会有BFC和IFC 首先要先了解两个概念:Box和formatting context: Box:CSS渲染的时候是以Box作为渲染的基本单位.Box的类型由元素的类型和display属性 ...

  6. 什么是BFC?(转载)

    在解释 BFC 是什么之前,需要先介绍 Box.Formatting Context的概念. Box: CSS布局的基本单位 Box 是 CSS 布局的对象和基本单位, 直观点来说,就是一个页面是由很 ...

  7. 前端里神奇的BFC 原理剖析

    以前在做自适应两栏布局的时候别人口中听到bfc这个词,于是看了各种关于bfc的文章,发现梦想天空介绍的不错,今天就在他的基础上润色一下. 一.BFC是什么? 在解释 BFC 是什么之前,需要先介绍 B ...

  8. BFC 神奇背后的原理

    BFC已经是一个耳听熟闻的词语了,网上有许多关于BFC的文章,介绍了如何触发BFC, 以及BFC的一些用处(如清浮动,防止margin重叠等).虽然我知道如何利用BFC解决这些问题,但当别人问我BFC ...

  9. 【转】前端精选文摘:BFC 神奇背后的原理

    BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...

  10. 全面理解BFC

    BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...

随机推荐

  1. C语言-10-位域与共用体

    位域 在某种特定情况下,一个结构体中的多个变量只使用各自存储空间的几位,而其他位从来不使用.这种情况下,可以使用位域来限定每个变量的用来存储数据的位宽. 作用 限定结构体中变量用来存放数据的位宽,即使 ...

  2. 怎样查看linux版本

    玩一台新的linux服务器,首先要做的,就是先看下是什么版本的系统: 命令如下: 登录到linux执行cat /etc/redhat-release ,例如如下: [root@3.5.5Biz-46 ...

  3. Wing IDE 5 的破解

    Wing IDE 百度百科 1.安装好Python,已测的是Python 2.7.10: 2.新建一个py文件CalcActivationCode.py(名字自己随便取): 3.CalcActivat ...

  4. 使用SoapUI做webservice的模拟系统实例

    实现步骤: 1.打开SoapUI工具,导入工程文件 2.右键生成一个模拟服务 3.由于要考虑到不同的输入返回不同的输出,因此需要写脚本对输入报文进行解释,然后针对输入来判断返回 3.1.建立不同的返回 ...

  5. 连接Oracle远程数据库错误:ORA-12541,ORA-12514,ORA-01017的解决方法!

    1.出现如下错误:ORA-12541:TNS:no listener,如下图所示: 错误原因是我们没有开启Listener监听器服务,解决方法是在服务中开启这个服务,如下图所示. 2.出现如下错误:O ...

  6. wordpress安装记录

    wordpress 已经完全部署到Linux后,进行开始安装的时候,数据库信息都填入好了(前提是:链接信息输入都正确) 然后点击会报错,说是链接数据库失败(数据库是建在阿里云服务器上的),但是具体不知 ...

  7. html的<head><title><meta>

    head <head>用来标记HTML的头部,里面通常需要包括标题,基础信息,源信息等,定义在HTML头部的内容往往不会在网页上直接显示 title <title>的内容设置在 ...

  8. MapReduce形象总结

    We want to count all to the books in the library.You count up shelf #1,I count up shelf #2. That's a ...

  9. openssl c_rehash

    一.简介 c_rehash 为文件创建一个符号连接,并将此符号连接的名称设为文件的hash值,作用是让openssl在证书目录中能够找到证书. 二.语法 c_rehash [-old] [-h] [- ...

  10. POJ 2299 Ultra-QuickSort(线段树入门)

    Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Description In this problem, you have to ana ...