其他分享
首页 > 其他分享> > uniapp 顶部tabs固定

uniapp 顶部tabs固定

作者:互联网

增加sticky-top样式 

		<view class="sticky-top">
			<u-tabs @change="changePackStatus" height="84" font-size="28" name="cate_name" bar-width="60" bar-height="4"
			 active-color="#EB9309" count="cate_count" :list="list" :is-scroll="false" :current="current"></u-tabs>
			 <view class="search-box">
			 	<u-search search-icon="/static/images/search.png" :show-action="false" bg-color="#F5F5F5" placeholder="搜索订单号或备注"
			 	 @change="search" v-model="keyword"></u-search>
			 </view>
		</view>
	.sticky-top{
		position: sticky;
		top: 0;
		left: 0;
		right: 0;
		width: 100%;
		z-index: 1;
	}

 

标签:uniapp,right,width,tabs,top,sticky,顶部,100%
来源: https://blog.51cto.com/u_14097531/2979805