<view class="content">
  <view class="today">
    <view class="info">
      <view class="temp">{{today.wendu}}℃</view>
      <view class="weather">{{today.todayInfo.type}} {{today.todayInfo.fengxiang}} {{today.todayInfo.fengli}}</view>
      <view>友情提示:{{today.ganmao}}</view>
      <view class="city">{{city}}</view>
    </view>
  </view>
  <import src="../template/itemtpl" />
  <view class="future">
    <block wx:for="{{future}}" wx:key="*this">
      <template is="future-item" data="{{item}}" />
    </block>
  </view>
</view>

.content不起作用

.content{
    font-family : 微软雅黑,宋体;
    font-size: 14px;
    background-size:cover;  
    height: 100%;
    width:100%;
}

 看开发工具调试  content外套一层page,所以再给page一个height:100%就可以了

小程序 给最外层view设置百分之百高度不起作用

相关文章:

  • 2021-09-23
  • 2021-07-02
  • 2021-07-06
  • 2021-07-11
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2021-11-21
  • 2022-12-23
  • 2021-08-02
相关资源
相似解决方案