2020//7/6学习记录

日常记录,非技术型分享,有错误希望大家帮我指正

 

1.微信小程序圆角样式

border-radius: 20rpx;

2.微信小程序横向布局

display: flex;

/*row 横向 column 列表 */

flex-direction: row;

/* 左右居中 */

justify-content: center;

/* 上下居中 */

align-items: center;

3.文字左右布局

父元素用到:justify-content:space-between;

子元素:

    <view style="text-aligin:left;padding-left:20rpx;">我发起的团购</view>

    <view style="text-aligin:right;padding-right:20rpx;">发起</view>

4.微信小程序文字悬浮图片上方

<view class="img-parent">

        <image src="{{}}"  mode='widthFix' class="list-pic"></image>

        <view class="child" wx:if="{{item.isEnd ==false}}">

          活动还剩2天

        </view>

        <view class="child_end" wx:if="{{item. isEnd ==true}}">

          活动结束了

        </view>

 </view> 

样式部分:

.img-parent{

  height: 300rpx; 

  width: 330rpx;

  position: relative;

}

.child {

  width: 100px;

  height: 50rpx;  

  position: absolute;

  left: 130rpx;

  top: 10rpx;

  margin: auto;

  text-align: center;

  background: yellowgreen;

  border-top-left-radius: 15px;

  border-bottom-left-radius:15px;

 

.child_end {

  width: 100px;

  height: 50rpx;  

  position: absolute;

  left: 130rpx;

  top: 10rpx;

  margin: auto;

  text-align: center;

  background: gray;

  border-top-left-radius: 15px;

  border-bottom-left-radius:15px;

5.微信小程序bindtap跳转页面

<view bindtap="test">跳转</view>

js部分

test:function(){

 wx.navigateTo({

      url: ''

   })

}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值