小程序页面卡片式效果

效果图

小程序页面卡片式效果_第1张图片

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>
      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="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;
}

具体效果扫码体验

你可能感兴趣的:(小程序,html,css)