本文共 1797 字,大约阅读时间需要 5 分钟。
陆续补全 ~
因无PC前端基础,个人理解应基于CSS的属性
2019/11/4 补入:针对掌握前端Html、Css的人群,可以忽略此篇内容
display: 组件内的元素显示方式。通常设置为flex,使元素更加灵活。
方式一(具体)width: 100rpx;height: 100rpx;方式二(区间)width: 100%;height: 100%
line-height: 44rpx;
color: red;
background-color: #eee;
font-size: 50rpx;
取值范围100-900,正常:400,加粗:700,font-weight: 700;
display: inline-block;
white-space: nowrap;
flex-direction : column 或 row;// column表示按列排序,row表示按行排序
水平:align-items: center;垂直:justify-content: center;正中:align-items: center;justify-content: center。
注:某些相邻的margin会发生合并,称之为margin折叠,具体现象为若两个块级元素都设置了margin,则取两者之间的最大值作为两个元素的外边距
margin折叠常规常识
方式一
可取值:auto/数值/百分比
方式二
margin:20rpx
margin: 20rpx 10rpx 25rpx 10rpx
margin:20rpx 20rpx:
margin:20rpx 20rpx 10rpx:
方式一
可取值:auto/数值/百分比
方式二
padding:20rpx
padding:20rpx 10rpx 25rpx 10rpx
padding:20rpx 20rpx:
padding :20rpx 20rpx 10rpx:
四边圆角
border-radius: 5px
属性扩展(各位置圆角设置,未设置的默认未直角)
border-top-left-radius
border-top-right-radius
border-bottom-right-radius
border-bottom-left-radius
场景示例:仅显示一半圆角
border-radius: 0px; border-bottom-right-radius: 5px; border-top-right-radius: 5px;
参考文章
转载地址:http://vbglz.baihongyu.com/