小程序 自定义气泡框

news/2024/7/20 2:13:21 标签: 小程序, 微信

// wxml 
<image catchtap="eduBulletFrame" src="/images/question.png"></image>

<view class="s_explanation" wx:if="{{ifBulletFrame}}" catchtap="eduBulletFrame">满2001减1000满2001减1000满2001减1000满2001减1000满2001减1000满2001减1000满2001减1000满2001减1000满2001减1000</view>
// js
ifBulletFrame:false,
eduBulletFrame(e) {
    let ifBulletFrame = this.data.ifBulletFrame   //控制显示的参数
    this.setData({
      ifBulletFrame: !ifBulletFrame,
    })
  },

// css

.s_explanation {
  font-size: 26rpx;
  max-width: 252rpx;
  color: #333333;
  padding: 20rpx 40rpx;
  background: #ffffff;
  position: absolute;
  top: -40rpx;
  left:330rpx;
  border-radius: 12rpx;
  z-index: 10;
  box-shadow:2rpx 2rpx 8rpx 8rpx #E4E4E4;

}
.s_explanation:before{
  position: absolute;
  top: 60rpx;
  left: -10rpx;
  content: '';
  width: 20rpx;
  height: 20rpx;
  background: #ffffff;
  transform: rotate(135deg);
  box-shadow:0rpx 0rpx 8rpx 8rpx #E4E4E4;
}
.s_explanation:after{
  position: absolute;
  top: 45rpx;
  left: 0rpx;
  content: '';
  width: 35rpx;
  height: 60rpx;
  background: #fff;
}


http://www.niftyadmin.cn/n/1162697.html

相关文章

TypeError: this.cliEngineCtor is not a constructor,webstorm和eslint的版本纠结

在webstorm里使用eslint的时候&#xff0c;会提示 TypeError: this.cliEngineCtor is not a constructor &#xff0c;这样的一个错误&#xff0c;知道应该是版本的错误&#xff0c;但具体版本怎么区别&#xff0c;eslint的版本和webstorm的版本如何对应&#xff0c;需要注意。…

小程序 自定义省市区三联动

<view class"index"><view class"input" bindtap"getbox" wx:if"{{!inputShow}}" style"color: #999;">请选择地址</view><view class"input" bindtap"getbox" wx:if"{{inpu…

小程序 多个订单倒计时

<view class"oa_btn_time"><text class"oa_list_grary">支付剩余&#xff1a;</text>{{item.countDownTime}} </view> import utils from ../../utils/util data(){ list:[{endTime: "2022-08-24 11:44:37"}] }, onLoad…

js 函数节流 函数防抖

函数节流: 频繁触发,但只在特定的时间内才执行一次代码函数防抖: 频繁触发,但只在特定的时间内没有触发执行条件才执行一次代码 两者区别在于函数节流是固定时间做某一件事&#xff0c;比如每隔1秒发一次请求。而函数防抖是在频繁触发后&#xff0c;只执行一次&#xff08;两者…

react下载excel文件流

<Button onClick{()>{exportExcel()}}>导出</Button>const exportExcel () > {let orderValidityReq {}orderListExcel(orderValidityReq).then(res >{console.log(res)const link document.createElement("a");let blob new Blob([res.dat…

小程序 二维数组里面做多选

<view class"" wx:for"{{testList}}" wx:key"index"><view class"ro_detail_all_title">{{item.names}}<label class"ro_red">&#xff08;可选一件&#xff09;</label></view><view cla…

小程序 验证码60秒倒计时

<button disabled"{{isClick}}" class"r_code" bindtap"getCountdown">{{timeCode}}</button> /*** 页面的初始数据*/data: {navbarData: { // 组件所需的参数showCapsule: true, //是否显示左上角图标 capsuleType: return, // 左…