收藏
回答

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

如下图中标红的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;

}


回答关注问题邀请回答
收藏

1 个回答

  • LastLeaf
    LastLeaf
    2017-08-14

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

    2017-08-14
    有用
    回复
登录 后发表内容