@import "iconfont.wxss"; .container { display: flex; align-items: center; position: relative; box-sizing: border-box; padding: 0 9rpx 0 14rpx; } .bar { flex: 1.5; height: 68rpx; font-size: 30rpx; border-radius: 50px; background-color: #f5f5f5; padding-left: 60rpx; padding-right: 19rpx; margin-right: 6rpx; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; line-height: 68rpx; } .bar_center{ text-align: center; } .search { background: #d43c33; color: #fff; font-size: 27rpx; flex: 0.2; padding: 14rpx; letter-spacing: 4rpx; border-radius: 13px; } .in-bar { color: #999; } .find { position: absolute; top: 50%; transform: translate(16rpx, -50%); color: #9f9f9f; transition: all .6s ease; } .bar_center_icon{ transform: translate(170rpx,-50%); }