html52.com
我爱小程序-开发者交流社区

两个同级view命令a和b,a和b调用同用的value,b继承a的样式

问题模块
API和组件

如下图中标红的style会对下面整个代码产生影响(主要是10rpx这个参数),导致wxss定义不生效


<view class="container" style="padding:5rpx 1rpx 10rpx 1rpx">

  <input placeholder="省、市、区" type="text" value="{{province}}{{city}}{{county}}" focus="{{focus}}" bindfocus="open" />

</view>


<view wx:if="{{condition}}" class="citypicker">

  <picker-view indicator-style="height: 50px;" style="width: 90%; height: 300px;" value="{{value}}" bindchange="bindChange" class="citybody">

    <view class="cityheader">

      <text bindtap="open" class="city-true" style="float: right;">完成</text>

    </view>

    <picker-view-column>

      <view wx:for="{{provinces}}" wx:key="item" style="line-height: 50px;padding-left:10px;">{{item}}</view>

    </picker-view-column>

    <picker-view-column>

      <view wx:for="{{citys}}" wx:key="item" style="line-height: 50px;padding-left:10px;">{{item}}</view>

    </picker-view-column>

    <picker-view-column>

      <view wx:for="{{countys}}" wx:key="item" style="line-height: 50px;padding-left:10px;">{{item}}</view>

    </picker-view-column>

  </picker-view>

</view>


<view class="full-address">

  <textarea bindconfirm="bindTextarea" auto-focus auto-height placeholder="详细地址" />

</view>


wxss


.region_info{

font-size:16px;

color: red;

}


.container input{

border:1rpx solid #D3D3D3;

font-size:16px;

width: 100%;

float: left;

height:20rpx;

}


.city-true{

float: right;

color: blue;

font-size:16px;

}


.full-address{

border:1rpx solid #D3D3D3;

font-size:16px;

}


网友回复

LastLeaf:

你好,具体是什么问题呢?

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付