CSS 弹性盒子模型

https://www.w3.org/TR/2016/CR-css-flexbox-1-20160526/

CSS Flexible Box Layout Module Level 1

W3C Candidate Recommendation, 26 May 2016

1

1

深入了解 Flexbox 伸缩盒模型

1

w3schools

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_layout_semantic

http://www.w3schools.com/css/css3_flexbox.asp

http://www.w3cplus.com/

1

1

Website Layout Using HTML5

HTML5 offers new semantic elements that define different parts of a web page:

  • <header> - Defines a header for a document or a section
  • <nav> - Defines a container for navigation links
  • <section> - Defines a section in a document
  • <article> - Defines an independent self-contained article
  • <aside> - Defines content aside from the content (like a sidebar)
  • <footer> - Defines a footer for a document or a section
  • <details> - Defines additional details
  • <summary> - Defines a heading for the <details> element

This example uses <header>, <nav>, <section>, and <footer> to create a multiple column layout:

HTML Layout Using <div> Elements

The <div> element is often used as a layout tool, because it can easily be positioned with CSS.

This example uses four <div> elements to create a multiple column layout:

HTML Layout Using Tables

The <table> element was not designed to be a layout tool.
The purpose of the <table> element is to display tabular data.

Layout can be achieved using the <table> element, because table elements can be styled with CSS:

http://www.w3schools.com/html/html_responsive.asp

1

1

4 Different HTML/CSS Layout Techniques to Create a Site

  • Tables. What’s good about them? Using tables for layout creation is intuitive. You can see them almost everywhere! You don’t even need to use a separate CSS stylesheet when using tables. And, what is more important, they don’t break. Have you ever seen a broken table? No? Me neither. Sounds great. We’ll use one of them for our site later.
  • Float. We’re talking about the CSS property here. It’s common practice to use float within your web page to create a layout. And, in this case, you will need to use a separate stylesheet. Two files, huh? Sounds not so convenient comparing to using tables. However, using float is kind of a standard. The only way you’ll use your HTML file is to determine the content of your web page. If you want to align your content in some freaky way, you must use the CSS file. Only!
  • CSS Frameworks. These work the same way as JavaScript frameworks. Just add the source file to your header (using<link rel="stylesheet" type="text/css" href="stylesheets/framework_file.css">, for example) and it’s ready to go! There is no need to write your own properties. Just use the classes that framework developers prepared for you. Sounds great. But how does it work? We’ll see.
  • Flexbox. Flexbox is a short name for the CSS Flexible Box Layout Module. And this is something new comparing to the float property, for example. The main idea behind the flexbox is to give a container the ability to alter its items’ width, height and order. You should use it if you want to fill the available space in the best possible way. For example, to accommodate to all kind of display devices and screen sizes. A flex container will expand its items to fill the screen.

https://www.w3.org/TR/2016/CR-css-flexbox-1-20160526/

## refs

***

<div>
<a href="https://info.flagcounter.com/QIXi">
<img src="https://s11.flagcounter.com/count2/QIXi/bg_000000/txt_00FF00/border_FF00FF/columns_3/maxflags_12/viewers_0/labels_1/pageviews_1/flags_0/percent_1/" alt="Flag Counter" border="0">
</a>
</div>

***

<blockquote style="display: flex; flex-flow: column; align-items: center; justify-content: center; text-align: center; border: none;">
<h3><strong><span style="font-size: 16pt; color: #00ff00;">&copyxgqfrms 2012-<span data-uid="copyright-aside">2020</span></strong></span</h3>
<p><span style="font-size: 18pt; color: #00ff00;"><strong>www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!</strong></span></p>
</blockquote>

***

CSS 弹性盒子模型的更多相关文章

  1. 使用css弹性盒子模型

    提示: 当期内容不充实, 修改后再来看吧 以下称:弹性子元素: 子元素, 弹性容器: 容器 弹性盒子的属性 1. css弹性盒子模型规定了弹性元素如何在弹性容器内展示 2. 弹性元素默认显示在弹性容器 ...

  2. css中的f弹性盒子模型的应用案例

    案例1: <!doctype html> <html> <head> <meta charset="utf-8"> <meta ...

  3. CSS box-flex属性,然后弹性盒子模型简介

    今天做项目的时候发现一个css3的新属性flex 一.什么是flex 它的作用是能够按照设置好的规则来排列容器内的项目,而不必去计算每一个项目的宽度和边距.甚至是在容器的大小发生改变的时候,都可以重新 ...

  4. CSS box-flex属性,然后弹性盒子模型简介(转)

    一.淡淡的开头语 昨天趁着不想工作的时间间隙闲逛24ways,在My CSS Wish List一文中,见到了个新鲜的CSS属性,就是题目中的box-flex,以前没有见过,顿生疑惑,不知是骡子还是马 ...

  5. CSS Flexbox 弹性盒子模型

    CSS Flexbox 弹性盒子模型 设置元素样式为 display: flex 或 display: inline-flex, 让元素变成flex容器, 从而可以通过flex模式布局它的子元素. f ...

  6. css3弹性盒子模型

    当下各种手机,平板尺寸不一,如果盒模型只能固定尺寸,不能随意压缩,将不能很好的迎合这个时代.所以css3推出了新的盒模型——弹性盒子模型(Flexible Box Model). 弹性盒模型可以水平布 ...

  7. flexbox弹性盒子模型

    这几天在做移动端的web开发,遇到了一些问题,之前没有折腾过这方面的东西,这次好好吸收下 css3的flexbox--弹性盒子模型,这个盒模型决定了一个盒子在其他盒子中的分布方式及如何处理可用的空间. ...

  8. 弹性盒子模型display:flex

    1.div上下左右居中 <!DOCTYPE html> <html lang="en"> <head> <meta charset=&qu ...

  9. css3弹性盒子模型之box-flex

    css3弹性盒子模型之box-flex 浏览器支持 目前没有浏览器支持 box-flex 属性. Firefox 支持替代的 -moz-box-flex 属性. Safari.Opera 以及 Chr ...

随机推荐

  1. 转 3 jmeter的两种录制方法

      录制1-badboy(推荐) badboy是一款自动化测试工具,它可以完成简单的功能测试和性能测试.其实它是一款独立的测试工具,只不过它录制东西导出的格式适用于jmeter,所以我们经常把jmet ...

  2. 解读腾讯敏捷研发核心驱动力 腾讯TAPD TAPD 2020-12-17

    解读腾讯敏捷研发核心驱动力 腾讯TAPD TAPD 2020-12-17

  3. Infrastructure as Code 行为驱动开发指南 https://www.ibm.com/developerworks/cn/devops/d-bbd-guide-iac/index.html

    Infrastructure as Code 行为驱动开发指南 https://www.ibm.com/developerworks/cn/devops/d-bbd-guide-iac/index.h ...

  4. 服务降级 托底预案 Nginx中使用Lua脚本检测CPU使用率,当达到阀值时开启限流,让用户排队

    https://mp.weixin.qq.com/s/FZAcQQAKomGEe95kln1HCQ 在京东我们是如何做服务降级的 https://mp.weixin.qq.com/s/FZAcQQAK ...

  5. 游标 深度分页 deep paging

    Solr Deep Paging(solr 深分页) - ickes的专栏 - CSDN博客 https://blog.csdn.net/xl_ickes/article/details/427725 ...

  6. session和cookie自动登录机制

    cookie的存储 cookie是浏览器支持的一种本地存储方式.以dict,键值对方式存储. {"sessionkey": "123"} 浏览器会自动对于它进行 ...

  7. 基于nginx的频率控制方案思考和实践

    基于nginx的频率控制方案思考 标签: 频率控制 nginx 背景 nginx其实有自带的limit_req和limit_conn模块,不过它们需要在配置文件中进行配置才能发挥作用,每次有频控策略的 ...

  8. SpringBoot Web 学习

    SpringBoot Web 开发 静态资源 打开WebMvcAutoConfiguration类里面的静态类WebMvcAutoConfigurationAdapter里面的addResourceH ...

  9. loj黑暗城堡

    黑暗城堡 题目描述 你知道黑暗城堡有\(N\)个房间,M 条可以制造的双向通道,以及每条通道的长度. 城堡是树形的并且满足下面的条件: 设\(D_i\)为如果所有的通道都被修建,第i号房间与第1号房间 ...

  10. PyQt中ui编译成窗体.py,中文乱码

    我在Eric工具下编译的 解决办法: 1.打开 C:\Python27\Lib\site-packages\eric4\i18n,将中文资源包的名称"GB2312."去掉,变成er ...