微信小程序——个人中心——view在最前面——一行四个排列 - 新闻资讯 - 云南小程序开发|云南软件开发|云南网站建设-昆明葵宇信息科技有限公司

159-8711-8523

云南网建设/小程序开发/软件开发

知识

不管是网站,软件还是小程序,都要直接或间接能为您产生价值,我们在追求其视觉表现的同时,更侧重于功能的便捷,营销的便利,运营的高效,让网站成为营销工具,让软件能切实提升企业内部管理水平和效率。优秀的程序为后期升级提供便捷的支持!

您当前位置>首页 » 新闻资讯 » 小程序相关 >

微信小程序——个人中心——view在最前面——一行四个排列

发表时间:2020-10-19

发布人:葵宇科技

浏览次数:119

效果图:
在这里插入图片描述

js代码:无

json代码:

{
  "navigationBarBackgroundColor": "#4ca1fb",
  "usingComponents": {}
}

wxml代码:

<!--pages/jiaocheng/jiaocheng.wxml-->
<view class='container'>
  <!--1部分 -->
  <view class='top-container'>
    <image class='bg-img' src='../images/backmy.png'></image>
  </view>
  <!--2部分 -->
  <view class='middle-container'>
    <view class="view_2">
      <view class="view_tupianwenzi">
        <image class="image_tupian" src="../images/badge.png"></image>
        <text class="text_1">打车</text>
      </view>
      <view class="view_tupianwenzi" bindtap="webViewAll" id="2">
        <image class="image_tupian" src="../images/card.png"></image>
        <text class="text_1">门票</text>
      </view>

      <view class="view_tupianwenzi" bindtap="jianjie" bindtap="webViewAll" id="3">
        <image class="image_tupian" src="../images/color.png"></image>
        <text class="text_1">酒店</text>
      </view>
      <view class="view_tupianwenzi" bindtap="webViewAll" id="6">
        <image class="image_tupian" src="../images/flex.png"></image>
        <text class="text_1">更多</text>
      </view>
    </view>

  </view>

  <!--3部分 -->
  <view class='bottom-container'>
    <view class='middle-item' hover-stay-time="150">
      <text class='middle-tag'>设置</text>
    </view>

    <view class='middle-item' hover-class="opcity" hover-stay-time="150">
      <text class='middle-tag'>个人</text>
    </view>
  </view>


</view>

wxss代码:

.container {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: rgb(240, 240, 240);
  z-index: -2;
}

.top-container {
  height: 440rpx;
  position: relative;
  display: flex;
  flex-direction: column;
}

.bg-img {
  position: absolute;
  width: 100%;
  height: 440rpx;
  z-index: -1;
}

/* 中间--我的订单 */
.middle-container {
  height: 200rpx;
  display: flex;
  /* flex-direction: column; */
  align-items: center;
  border-radius: 20rpx;
  background-color: #FFFFFF;
  margin: -80rpx 30rpx 26rpx 30rpx;
  box-shadow: 0 15rpx 10rpx -15rpx #efefef;

}

.middle-item {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.middle-tag {
  margin: 0rxp 200rpx 0rpx 200rpx;
  font-size: 28rpx;
  color: #333333;
  line-height: 28rpx;
  font-weight: bold;
  padding-left: 22rpx;
}

.view_2 {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.text_1 {
  font-size: 30rpx;
}

.view_tupianwenzi {
  display: flex;
  flex-direction: column;
  width: 130rpx;
  align-items: center;
  margin-left: 25rpx;
  margin-right: 25rpx;
}

.image_tupian {
  display: flex;
  width: 80rpx;
  height: 80rpx;
}

/* 最底部 */
.bottom-container {
  height: 300rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 10rpx;
  background-color: #FFFFFF;
  margin: 0rpx 30rpx 26rpx 30rpx;
  box-shadow: 0 15rpx 10rpx -15rpx #efefef;
}

图片的话可以自己找点图片放上去
在这里插入图片描述

相关案例查看更多