box-css3
父容器样式必须有定义:"{ 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的更多相关文章
- CSS3入门
CSS3 w3cschools css3 MDN英文 MDN中文 CSS3 is the latest evolution of the Cascading Style Sheets langua ...
- BFC(Box Formatting Context)的原理
BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...
- 显示层封装及实现与优化(无动画+css3动画+js动画)
showhide.html <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...
- 前端精选文摘:BFC 神奇背后的原理
BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...
- 浅析CSS中的BFC和IFC
1. 为什么会有BFC和IFC 首先要先了解两个概念:Box和formatting context: Box:CSS渲染的时候是以Box作为渲染的基本单位.Box的类型由元素的类型和display属性 ...
- 什么是BFC?(转载)
在解释 BFC 是什么之前,需要先介绍 Box.Formatting Context的概念. Box: CSS布局的基本单位 Box 是 CSS 布局的对象和基本单位, 直观点来说,就是一个页面是由很 ...
- 前端里神奇的BFC 原理剖析
以前在做自适应两栏布局的时候别人口中听到bfc这个词,于是看了各种关于bfc的文章,发现梦想天空介绍的不错,今天就在他的基础上润色一下. 一.BFC是什么? 在解释 BFC 是什么之前,需要先介绍 B ...
- BFC 神奇背后的原理
BFC已经是一个耳听熟闻的词语了,网上有许多关于BFC的文章,介绍了如何触发BFC, 以及BFC的一些用处(如清浮动,防止margin重叠等).虽然我知道如何利用BFC解决这些问题,但当别人问我BFC ...
- 【转】前端精选文摘:BFC 神奇背后的原理
BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...
- 全面理解BFC
BFC 已经是一个耳听熟闻的词语了,网上有许多关于 BFC 的文章,介绍了如何触发 BFC 以及 BFC 的一些用处(如清浮动,防止 margin 重叠等).虽然我知道如何利用 BFC 解决这些问题, ...
随机推荐
- iOS打包ipa select a method for export几个选项的意思
他们的意思分别为:Save for iOS App Store Deployment保存到本地 准备上传App Store 或者在越狱的iOS设备上使用,需要提供发布证书 Save for Ad Ho ...
- JDK8 API文档(下载)
DK API文档 java SE 8 API文档: http://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downl ...
- 手动删除webapps下项目,导致Document base %TOMCAT_HOME%\webapps\XXX does not exist or is not a readable directory
删除 %TOMCAT_HOME%\conf\XXX.xml , 再次eclipse中重新启动tomcat,错误就会消失.
- centos性能监控系列三:监控工具atop详解
引言 Linux以其稳定性,越来越多地被用作服务器的操作系统(当然,有人会较真地说一句:Linux只是操作系统内核:).但使用了Linux作为底层的操作系统,是否我们就能保证我们的服务做到7*24地稳 ...
- 怎样查看linux版本
玩一台新的linux服务器,首先要做的,就是先看下是什么版本的系统: 命令如下: 登录到linux执行cat /etc/redhat-release ,例如如下: [root@3.5.5Biz-46 ...
- hdu 4607 Park Visit 求树的直径
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4607 题目大意:给你n个点,n-1条边,将图连成一棵生成树,问你从任意点为起点,走k(k<=n) ...
- 如何删除TFS的Team Project
我们可以使用Visual Studio或Web新建一个TeamProject,但是删除时却没有一个合适的图形界面删除我们不想要的Team Project,所以此时就可以使用命令TFSDeletePro ...
- Culcurse
一.简介 如果你是一个享受Linux终端的系统管理员,但同样需要一种方法来安排每天最重要的任务.约会和会议,你会发现calcurse是一个很有用的工具.calcurse包含了日历.一个待办事项管理.一 ...
- PHPDBG
一.简介 PHPDBG的是一个轻量级.强大.易用的PHP调试平台.可以在PHP5.4和之上版本中使用.在php5.6和之上版本将内部集成. 二.安装 PHP源码下载 http://php.net/gi ...
- Hog SVM 车辆 行人检测
HOG SVM 车辆检测 近期需要对卡口车辆的车脸进行检测,首先选用一个常规的检测方法即是hog特征与SVM,Hog特征是由dalal在2005年提出的用于道路中行人检测的方法,并且取的了不错的识别效 ...