小程序頁面卡片式效果

效果圖

在這裏插入圖片描述

wxml

  <view class="backgroud-float">
    <view class="flex-row">
      <view class="title-margin">
        <image class="icon" style="width: 25px; height: 25px;" src='../../pages/img/education.png'></image>
      </view>
      <view class="title-margin">
        <text class="border-left" decode="{{true}}">子女教育</text>
      </view>
      <view class="title-margin">
        <image style="width: 16px; height: 16px;" src='../../pages/img/hint-g.png' bindtap = 'showEducationHint'></image>
      </view>
    </view>
    <view wx:if="{{showEducationView}}" class="poptip">
      <view class="explain-margin">
      (1) 納稅人年滿3歲的子女接受學前教育和學歷教育的相關支出,按照每個子女每月1000元(每年12000元)的標準定額扣除;
      </view>
      <view class="explain-margin">
      (2) 父母可以選擇由其中一方按100%扣除,也可以選擇由雙方分別按50%扣除。
      </view>
    </view>
    <view class="flex-row">
      <button class="button{{oneChildFlg?'-choosed':''}}" bindtap="oneChildBtnClk">1子女
      </button>
      <button class="button{{twoChildrenFlg?'-choosed':''}}" bindtap="twoChildrenBtnClk">2子女
      </button>
      <input type="digit" class="button third" name="稿酬收入" placeholder='自定義' value='{{childNumValue}}' bindinput="childNumInput" placeholder-class="placeholder"/>
    </view>
    <!-- <view class="hintdisplay">
      <text style="width:200px;" decode="{{true}}">{{childNumDigitHint}}</text>
    </view> -->
    <view class="flex-row">
      <button class="button{{hundredPercentFlg?'-choosed':''}}" bindtap="hundredPercentBtnClk">100%扣除
      </button>
      <button class="button{{fiftyPercentFlg?'-choosed':''}}" bindtap="fiftyPercentBtnClk">50%扣除
      </button>
    </view>
    <view class="flex-row-center">
      <view class="font-left">子女教育扣除費用</view>
      <view class="font-center">{{educationDeductionValue}}</view>
      <view class="font-right">/月</view>
    </view>
  </view>

wxss

核心部分

.backgroud-float{
  /* background-color: #898989; */
  height: 80%;
  width: 80%;
  margin-left: 10%;
  box-shadow: 4px 4px 8px  rgba(0,0,0,0.5);
  margin-bottom: 20px;
}

具體效果掃碼體驗

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章