我想要的效果是和图片里那样 但现在不显示滑块
<template>
<view class="shouyeContainer">
<!--头部-->
<view class="header">
<image class='logo' src="../../static/icon/首页图标.jpg" mode=""></image>
<view class="search">
<text class='iconfont icon-sousuo'></text>
<input type="text" value="" placeholder="搜索..." placeholder-class='placeholder'/>
</view>
<button type="default">考研上岸</button>
</view>
</view>
<!--滑块-->
<scroll-view class="navcroll" scroll-x="true" >
<view class="navItem">推荐</view>
<view class="navItem">推荐</view>
<view class="navItem">推荐</view>
<view class="navItem">推荐</view>
<view class="navItem">推荐</view>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang='stylus'>
.shouyeContainer
.header
display flex
padding 10rpx 5rpx
.logo
width 140rpx
height 40rpx
margin: 10rpx
.search
width 420rpx
height 60rpx
background: #F0FFFF
position: relative
input
width: 360rpx
height: 60rpx
margin-left: 60rpx
.placeholder
font-size: 26rpx
.iconfont
position: absolute
font-size: 40rpx
left: 10rpx
top: 10rpx
button
width: 144rpx
height: 60rpx
line-height: 60rpx
text-align center
font-size 26rpx
padding: 0 4rpx
.navcroll
display flex
white-space nowrap
.navItem
display: inline-block
</style>