css样式

  1. 一个页面中仅能有一个h1,尽量不使用h标签,可选择span
  2. 修改组件样式:深度查询 /deep/.ant-select-selection {}
    修改部分组件样式 .content { /deep/.ant-select-selection{ } }
  3. 表单中描述之类多行文本使用textarea
  4. 圆角渐变边框
	<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;
		// }
  1. nth-child不生效问题,遇到 标签
  2. 模糊属性 // filter: blur(0.8px);
  3. 边距使用计算属性
 margin: 0 auto;
  width: calc(100% - 9px);
  1. 绝对定位居中方法
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值