- 一个页面中仅能有一个h1,尽量不使用h标签,可选择span
- 修改组件样式:深度查询 /deep/.ant-select-selection {}
修改部分组件样式 .content { /deep/.ant-select-selection{ } } - 表单中描述之类多行文本使用textarea
- 圆角渐变边框
<view class="container">
<view class="content"></view>
</view>
.container{
width: 200px;
height: 80px;
margin: 0 auto;
position: relative;
/*给父元素设置渐变背景色*/
background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
/*给父元素设置圆角边框*/
border-radius: 8px 0 8px 0;
}
.content{
width: 194px;
height: 74px;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto auto;
/*让子元素背景色同页面背景色一致*/
background: #1BB9DE;
/*让子元素圆角同父元素保持一致*/
border-radius: 8px;
}
// .container {
// width: 200px;
// height: 80px;
// margin: 0 auto;
// position: relative;
// /*给父元素设置渐变背景色*/
// background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
// /*给父元素设置圆角边框*/
// border-radius: 8px 0 8px 0;
// }
// .content {
// width: 194px;
// height: 74px;
// position: absolute;
// top: 0;
// bottom: 0;
// left: 0;
// right: 0;
// margin: auto auto;
// /*让子元素背景色同页面背景色一致*/
// background: #1BB9DE;
// /*让子元素圆角同父元素保持一致*/
// border-radius: 8px 0 8px 0;
// }
- nth-child不生效问题,遇到
标签
- 模糊属性 // filter: blur(0.8px);
- 边距使用计算属性
margin: 0 auto;
width: calc(100% - 9px);
- 绝对定位居中方法
position: absolute;
left: 0;
right: 0;
margin: 0 auto;