本文共 1859 字,大约阅读时间需要 6 分钟。
陆续补全 ~
因无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;
// column为列序;row为行排序//列排序flex-direction :column//行排序flex-direction :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/