原创

小程序-组件-跳转-navigator导航

<navigator class='info-tag bg-white' id='idOpenMoreInfos' url="/pages/module/cailiaoshenhe/cailiaoshenhe?args=argsvalue1" hover-class="navigator-hover" >更多资讯>></navigator>


注:navigator-hover 默认为 {background-color: rgba(0, 0, 0, 0.1); opacity: 0.7;}<navigator/> 的子节点背景色应为透明色
示例代码:
/** wxss **/ /** 修改默认的navigator点击态 **/ .navigator-hover { color:blue; } /** 自定义其他点击态样式类 **/ .other-navigator-hover { color:red; }
<!-- sample.wxml --> <view class="btn-area"> <navigator url="/page/navigate/navigate?title=navigate" hover-class="navigator-hover">跳转到新页面</navigator> <navigator url="../../redirect/redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">在当前页打开</navigator> <navigator url="/page/index/index" open-type="switchTab" hover-class="other-navigator-hover">切换 Tab</navigator> </view>
正文到此结束
本文目录