Inside of a flexed container, a single item can control its own flex with align-self. The possible values are flex-startflex-endcenter, or stretch

Inside column layout, the ' stretch' is also limited by the 'height';

Inside row layout, the 'stretch' is aslso limited by the 'width'.

body {
display: flex;
flex-direction: row;
} .container {
background-color: #ebb871;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center
} .box1 { min-width: 50px; min-height: 50px;
/*align-self: flex-start;
align-self: flex-end;
align-self: center;*/
align-self: stretch;
}

body {
display: flex;
flex-direction: column;
} .container {
background-color: #ebb871;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center
} .box1 { min-width: 50px; min-height: 50px;
/*align-self: flex-start;
align-self: flex-end;
align-self: center;*/
align-self: stretch;
}

[CSS] Change the Alignment of a Single Flexed Item with 'align-self'的更多相关文章

  1. [CSS] Change the off-axis Alignment of a Flexed Container with `align-items`

    We changed the axis layout with 'justify-content', and the "off axis" layout is controlled ...

  2. [CSS] Change the auto-placement behaviour of grid items with grid-auto-flow

    We can change the automatic behaviour of what order our grid items appear. We can even re-order the ...

  3. [CSS] Easily Reset Styles With a Single CSS value

    There are times where you need to reset a an element’s styles. Instead of overwriting it with even m ...

  4. 浏览器兼容CSS代码:按钮文字垂直居中(input button text vertical align)

    经过测试的浏览器:IE6, IE7, IE8, IE9, Firefox, Chrome, Safiri, Maxthon 按钮的HTML代码: <input id="btn_comm ...

  5. (七十四)c#Winform自定义控件-金字塔图表

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...

  6. div+css样式

    Div+Css 随着页面上的需求变大,许多的东西不再使用单纯的图片.按钮.文字,而是通过Div+Css来实现按钮,公司的需求就是这样,一直在弄这个模块,顺便的总结一下 列如下面的页面都是通过div+c ...

  7. [转] How to generate multiple outputs from single T4 template (T4 输出多个文件)

    本文转自:http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/ Updat ...

  8. grid - 网格项目对齐方式(Box Alignment)

    CSS的Box Alignment Module补充了网格项目沿着网格行或列轴对齐方式. <view class="grid"> <view class='ite ...

  9. Hisat2 bowtie2比对结果解读(Hisat2 Alignment summary)

    RNA-seq数据的比对结果怎么解读?网上有很多人问,这里做一个大致的总结. Hisat2和bowtie2比对后产生的Alignment summary的格式是一样的,如下: Alignment su ...

随机推荐

  1. java抽象类及接口

    Java抽象类: 抽象类特点:抽象类除了不能实例化对象之外,类的其它功能依然存在,成员变量.成员方法和构造方法的访问方式和普通类一样. 由于抽象类不能实例化对象,所以抽象类必须被extends [抽象 ...

  2. Python 容器用法整理

    本文整理几种基本容器:列表.元组.字典和集合的用法和collections中几种已经预先实现的容器数据结构:namedtuple(),双向链表deque,ChainMap,Counter,Ordere ...

  3. C++利用权重方法将二进制正数转换为十进制数

    #include <iostream> #include <Windows.h> #include <string> using namespace std; in ...

  4. OpenCV学习笔记3

    OpenCV学习笔记3 图像平滑(低通滤波) 使用低通滤波器可以达到图像模糊的目的.这对与去除噪音很有帮助.其实就是去除图像中的高频成分(比如:噪音,边界).所以边界也会被模糊一点.(当然,也有一些模 ...

  5. 通用32位CPU 常用寄存器及其作用

    目录 32位CPU所含有的寄存器 数据寄存器 变址寄存器 指针寄存器 段寄存器 指令指针寄存器 标志寄存器 32位CPU所含有的寄存器 4个数据寄存器(EAX.EBX.ECX和EDX) 2个变址和指针 ...

  6. Jackson之LocalDateTime转换,无需改实体类

    [问题] Demo: LocalDateTime dt = LocalDateTime.now(); ObjectMapper mapper = new ObjectMapper(); try { S ...

  7. shell 学习笔记8-case条件语句

    一.case语句简介 1.什么是case条件语句 case条件语句就相当于多分支的if/elif/else条件语句,但是比这样的语句更规范更好看,经常被用在失效系统服务启动脚本等企业应用中 程序将ca ...

  8. VS.NET(C#)--2.8HTML服务器控件

    HTML服务器控件 服务器不处理HTML控件,例如:<h1>.<a>超链接.<input>,直接送到客户端,由浏览器呈现. 把HTML控件转换成HTML服务器控件, ...

  9. interface Part2(定义接口)

    一. 在 C# 语言中,类之间的继承关系仅支持单重继承,而接口是为了实现多重继承关系设计的. 二. 一个类能同时实现多个接口,还能在实现接口的同时再继承其他类,并且接口之间也可以继承. 三. 无论是表 ...

  10. 天然气水电行业专用抄表器PDA现场打印通知单

    传统的抄表工作是使用卡片记录,抄表工人不仅需要背着厚厚的卡片进行记录,回到电力局还需要有专门人员进行电脑录入,浪费了大量人力物力,而且各个环节上出错率比较高.电力专用抄表器的广泛应用使得电力抄表工作变 ...