flexbox_Flexbox中的Flex基础属性
flexbox
弹性基础 (Flex Basis)
The flex-basis
property defines the size of the flex-item
along the main axis of the flex container. The main axis is horizontal if flex-direction
is set to row
and it’ll be vertical if the flex-direction
property is set to column
.
flex-basis
属性定义沿flex容器的主轴的flex-item
的大小。 如果flex-direction
设置为row
,则主轴为水平轴;如果flex-direction
属性设置为column
,则主轴为垂直轴。
句法 (Syntax)
flex-basis: auto | content | <width> | <height>;
flex-basis:自动 (flex-basis: auto)
flex-basis: auto
looks up the main size of the element and defines the size. For example, on a horizontal flex container, auto
will look for width
and height
if the container axis is vertical.
flex-basis: auto
查找元素的主要尺寸并定义尺寸。 例如,在水平伸缩容器上,如果容器的轴是垂直的,则auto
将查找width
和height
。
If no size is specified, auto
will fall back to content
.
如果未指定大小,则auto
将退回到content
。
flex-basis:内容 (flex-basis: content)
flex-basis: content
resolves the size based on the element’s content, unless width
or height
is set through normal box-sizing
.
flex-basis: content
除非元素的width
或height
是通过常规box-sizing
设置的,否则content会根据元素的flex-basis: content
解析box-sizing
。
In both the cases where flex-basis
is either auto
or content
, if main size is specified, that size will take priority.
在flex-basis
是auto
或content
两种情况下,如果指定了main size,则以该大小flex-basis
。
flex-basis: (flex-basis:)
This is just as specifying width
or height
, but only more flexible. flex-basis: 20em;
will set the initial size of the element to 20em
. Its final size will be based on available space, flex-grow
multiple and flex-shrink
multiple.
就像指定width
或height
,但是更加灵活。 flex-basis: 20em;
将元素的初始大小设置为20em
。 其最终大小将取决于可用空间, flex-grow
倍数和flex-shrink
倍数。
The specification suggests use of flex
shorthand property. This helps write flex-basis
along with flex-grow
and flex-shrink
properties.
该规范建议使用flex
速记属性。 这有助于编写flex-basis
以及flex-grow
和flex-shrink
属性。
例子 (Examples)
Here is rows of individual flex containers and individual flex elements showing how flex-basis
affects the box-sizing
.
这是单个flex容器和单个flex元素的行,它们显示flex-basis
如何影响box-sizing
。
When the flex-direction
is column
, the same flex-basis
will control the height
property. You can see it in the example below:
当flex-direction
为column
,相同的flex-basis
将控制height
属性。 您可以在以下示例中看到它:
更多信息: (More Information:)
You can fund additional references about the flex basis property on the following pages:
您可以在以下页面上为有关弹性基准属性的其他参考提供资金:
CSS specification level 1
CSS规范级别1
Mozilla Developer Network page on flex-basis
flex-basis上的 Mozilla开发人员网络页面
有关Flexbox的更多信息: (More info on Flexbox:)
CSS Flexbox tips and tricks
CSS Flexbox提示和技巧
Flexbox - the ultimate cheatsheet
Flexbox-终极备忘单
翻译自: https://www.freecodecamp.org/news/flex-basis-property-in-flexbox/
flexbox
相关文章:

OpenStack之虚拟机热迁移
这里的环境是centos7版本,openstack K版 1.在各个计算节点设置权限 chmod 755 /var/lib/nova/instances 2.修改各个节点的nova.conf(/etc/nova/nova.conf) vncserver_proxyclient_address虚拟机IP # vncserver_listen0.0.0.0 3.修改所有计算节点libvirt 3.1 修改/e…

软件工程概论个人作业02
可怜的二柱子同学,老师又对他的自动出题系统提出了新的要求: 1、题目避免重复; 2、可定制(数量/打印方式); 3、可以控制下列参数: 是否有乘除法; 是否有括号(最多可以支持十个数参与计算)&#…

前端开发学习常用网站网址及介绍(都是免费的)
在开发的时候,想记住所有的单词基本是不可能的,所以就需要进入文档,只要理清需求能做出来,就很不差了!! 扫码加博主微信 1.百度,俗称度娘,有不懂的就问百度,有问必答&am…

sql语句语法多表关联_SQL Delete语句-如何删除行或表,语法示例
sql语句语法多表关联To delete a record in a table you use the DELETE statement.要删除表中的记录,请使用DELETE语句。 Be careful. You can delete all records of the table or just a few. Use the WHERE condition to specify which records do you wan…

数据库 大数据访问及分区分块优化方案
本文导读:当系统要满足每秒数万次的读写请求的需求时,我们可以用分布式计算、编写优良的程序代码、对海量数据进行分区操作、建立广泛的索引、建立缓存机制、加大虚拟内存、分批处理、使用数据仓库和多维数据库存储、使用负载均衡技术、将数据库的读写分…

每周算法讲堂 floyd
http://www.bilibili.com/video/av4108914/ 转载于:https://www.cnblogs.com/qscqesze/p/5284554.html

小程序云开发常用语句宝库
查询语句,返回的是 res.data[] 数组 调用云函数返回的是res.result get 数据获取返回的是 res.data{} 对象 1.调用云函数 this.DB wx.cloud.database() wx.cloud.init({env: mm-4t7rg }) wx.cloud.callFunction({name: "login",data: {},success(res)…

初学api测试_面向初学者的API-在此免费视频课程中学习如何使用API
初学api测试What exactly is an API? How do you use an API? Weve just published a full beginners course about Application Programming Interfaces (APIs) on the freeCodeCamp.org YouTube channel.API到底是什么? 您如何使用API? 我们刚刚…

整理Simple.Data使用方法
官方:http://simplefx.org/simpledata/docs/index.html Insert var user db.Users.Insert(Name: "Ford", Password: "hoopy", Age: 29);var user new User {Name "Zaphod", Password "zarquon", Age 42}; var actual db.Users.I…

css3之border-radius理解
在日常项目过程中,border-radius这个属性算是非常常用的属性之一了,通过设置元素的border-radius值,可以轻松给元素设置圆角边框,甚至实现绘制圆、半圆、四分之一的圆等各种圆角图形。 通常我在使用这个属性的时候,一般…

deepLink iOS 应用到自己APP 记录
1.了解deeplink 详细的介绍可以在网上查询,这里简单说一下.这项技术主要是为了方便广告跳转而产生的.最大的例子就是淘宝,天猫,京东等购物APP.在第三方APP中点击广告链接直接跳转到对应的客户端的商品的详情中,节省用户的时间,一步到位. 2.自己APP实现deeplink需要的准备工作…

小程序 reduce_使用reduce制作的10个更多实用程序功能
小程序 reduceThis time, with a test suite! 这次,带有测试套件! Previously I wrote about 10 utility functions implemented with JavaScripts reduce function. It was well-received, and I walked away with an even deeper appreciation for th…

洛谷1216 数字三角形
题目描述 观察下面的数字金字塔。 写一个程序来查找从最高点到底部任意处结束的路径,使路径经过数字的和最大。每一步可以走到左下方的点也可以到达右下方的点。 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 在上面的样例中,从7 到 3 到 8 到 7 到 5 的路径产生了最大 …

iOS 依次执行 异步网络请求的一种实现
1.首先先介绍一个概念dispatch_semaphore dispatch_semaphore信号量为基于计数器的一种多线程同步机制。用于解决在多个线程访问共有资源时候,会因为多线程的特性而引发数据出错的问题.如果semaphore计数大于等于1,计数-1,返回,程…

那些有趣的Webview细节
最近公司的项目"一步"上用到了webview与js交互,主要是用google地图必须要安装有google pay,但是国内的手机都去掉了, 没办法只有用google地图的网页版了, 好在公司ios的小伙伴会h5,英语也不赖, 所…

二进制搜索树_二进制搜索树数据结构举例说明
二进制搜索树A tree is a data structure composed of nodes that has the following characteristics:树是由具有以下特征的节点组成的数据结构: Each tree has a root node (at the top) having some value. 每棵树都有一个具有某些值的根节点(在顶部)。 The roo…

无序数组及其子序列的相关问题研究
算法中以数组为研究对象的问题是非常常见的. 除了排序大家经常会遇到之外, 数组的子序列问题也是其中的一大分类. 今天我就对自己经常遇到的无序数组的子序列相关问题在这里总结一下. 前置条件: 给定无序数组. 以下所以的问题均以此为前置条件. 例如无序数组nums [2, 1, 3]. 问…

IOS使用正则表达式去掉html中的标签元素,获得纯文本
IOS使用正则表达式去掉html中的标签元素,获得纯文本 content是根据网址获得的网页源码字符串 NSRegularExpression *regularExpretion[NSRegularExpression regularExpressionWithPattern:"<[^>]*>|\n"options:0error:nil];content[regularExpretion string…

苹果禁止使用热更新 iOS开发程序员新转机来临
今天本是女神们的节日,所有iOS程序员沸腾了!原因是苹果爸爸发狠了,部分iOS开发者收到了苹果的这封警告邮件: [图一 苹果邮件] 消息一出,一时间众多开发者众说纷纭,以下是来源于网络的各种看法:…

Python中的Lambda表达式
Lambda表达式 (Lambda Expressions) Lambda Expressions are ideally used when we need to do something simple and are more interested in getting the job done quickly rather than formally naming the function. Lambda expressions are also known as anonymous funct…

JAVA-初步认识-第十一章-object类-equals方法覆盖
一. 现在要谈论equals方法另一个方面。如果不写equals方法,直接用来比较也是可以的,貌似equals方法有点多余。 现在不比较对象是否相等,而是比较对象中的特定内容,比如说对象的年龄,之前的写法如下 其实这个方法写完后…

JPPhotoBrowserDemo--微信朋友圈浏览图片
JPPhotoBrowserDemo Browse picture like WeChat. GithubDemo 使用 CocoaPods pod JPPhotoBrowser 在使用的页面中 引用 #import "JPPhotoBrowserManager.h"下载使用 直接将下载文件中的 JPPhotoBrowser 文件夹拖入项目中在使用的页面中 引用 #import "JPPhot…

STM32F103 与 STM32F407引脚兼容问题
突袭网收集的解决方案如下 解决方案1: STM32F103有的功能407都有,并且这些功能的引脚完全兼容,只是程序不同而已。。。而STM32F407有的功能103不一定有,因为407强大些。。。。。。希望对你有用 解决方案2: 不能。407支…

getdate函数_SQL日期函数和GETDATE解释为带有语法示例
getdate函数There are 61 Date Functions defined in MySQL. Don’t worry, we won’t review them all here. This guide will give you an introduction to some of the common ones, and enough exposure for you to comfortably to explore on your own.MySQL中定义了61种日…

JPTagView-多样化的标签View
JPTagView Customized tag pages GitHubDemo 使用 CocoaPods pod JPTagView 在使用的页面中 引用 #import "JPTagView.h"下载使用 直接将下载文件中的 JPTagView 文件夹拖入项目中在使用的页面中 引用 #import "JPTagView.h"使用方法见demo

zsh 每次打开Terminal都需要source bash_profile问题
zsh 每次打开Terminal都需要source bash_profile问题 zsh加载的是 ~/.zshrc文件,而 ‘.zshrc’ 文件中并没有定义任务环境变量。 解决办法,在~/.zshrc文件最后,增加一行: source .bash_profile alias alias gs"git status&q…

解析json实例
解析项目目录中的一个json文件,将之转化为List的一个方法。 package com.miracles.p3.os.util;import com.miracles.p3.os.mode.VideoBean; import org.json.JSONArray; import org.json.JSONObject;import java.util.ArrayList; import java.util.List;/*** Create…

创建bdlink密码是数字_如何创建实际上是安全的密码
创建bdlink密码是数字I am very tired of seeing arbitrary password rules that are different for every web or mobile app. Its almost like these apps arent following a standard and are just making up their own rules that arent based on good security practices.…

通过分离dataSource 让我们的code具有更高的复用性.
转载自汪海的实验室 一 定义dataSource dataSource.h[objc] view plaincopytypedef void (^TableViewCellConfigureBlock)(id cell, id item); interface GroupNotificationDataSource : NSObject<UITableViewDataSource> - (id)initWithItems:(NSArray *)anItems …

复习心得 JAVA异常处理
java中的异常处理机制主要依赖于try,catch,finally,throw,throws五个关键字。其中, try关键字后紧跟一个花括号括起来的代码块(花括号不可省略)简称为try块。里面放置可能发生异常的代码。 catc…