html:
<view class="search-history-item">测试</view>
css:
.search-history-item{
width: fit-content;//自适应宽度(特定布局下不加此属性会独占一行)
padding: 16rpx 24rpx;
text-align: center;
background:rgba(245,245,245,1);
border-radius:33rpx;
font-size:24rpx;
font-weight:400;
color:rgba(49,48,44,1);
}