2022-05-29 556
CSS align-self 属性 在弹性容器、div中设置元素位置
实例
把弹性元素内的项目之一居中对齐:
#myBlueDiv { align-self: center; }
定义和用法
align-self 属性指定弹性容器内所选项目的对齐方式。
注意:align-self 属性将覆盖弹性容器的 align-items 属性。
默认值: | auto |
继承: | 否 |
动画制作: | 不支持。请参阅:动画相关属性。 |
版本: | CSS3 |
JavaScript 语法: | object.style.alignSelf="center" |
CSS 语法
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
属性值
值 | 描述 |
auto | 默认。元素继承其父容器的 align-items 属性,如果没有父容器,则为 "stretch"。 |
stretch | 定位元素以适合容器。 |
center | 元素位于容器的中央。 |
flex-start | 元素位于容器的开头。 |
flex-end | 元素位于容器的末端。 |
baseline | 元素被定位到容器的基线。 |
initial | 将此属性设置为其默认值。参阅 initial。 |
inherit | 从其父元素继承此属性。参阅 inherit。 |
原文链接:https://77isp.com/post/1020.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态