当前位置:网站首页>Solutions to the failure of last child and first child styles of wechat applet

Solutions to the failure of last child and first child styles of wechat applet

2022-06-26 13:33:00 woowen!

Use last-child perhaps first-child The subset needs to be wrapped in a parent element to take effect

.tab-content text:last-child {

        margin-right: 0;

}

<view class="tab-content">
      <text bindtap="tapActive" data-active="1" class="{
   {active === '1'?'active':''}}"> Trade purchasing agency </text>
      <text bindtap="tapActive" data-active="2" class="{
   {active === '2'?'active':''}}"> Accounts receivable </text>
      <text bindtap="tapActive" data-active="3" class="{
   {active === '3'?'active':''}}"> Inventory pledge </text>
      <text bindtap="tapActive" data-active="4" class="{
   {active === '4'?'active':''}}"> Advance payment </text>
      <text bindtap="tapActive" data-active="5" class="{
   {active === '5'?'active':''}}"> Inclusive finance </text>
    </view>

原网站

版权声明
本文为[woowen!]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170514022668.html