< web-view src = "https://wws.ximalaya.com/wws-lib/book/index/single/3/8075?libId=3676&dist=oEZ0yd" bindload = "load" binderror = "load" ></ web-view >
< block wx:if = "{{banner}}" >
< cover-view class = "banner start-center" >
< cover-view class = "banner-title text-hidden" bindtap = "switchBanner" >
{{banner.title}}
</ cover-view >
< cover-view class = "br" ></ cover-view >
< cover-view class = "banner-close center" bindtap = "closeBanner" >
< cover-image src = "https://dt-test-1252491111.cos.ap-shanghai.myqcloud.com/yishengyishu/close.png" ></ cover-image >
</ cover-view >
</ cover-view >
</ block >
|
.banner{
position : fixed ;
top : 80 rpx;
right : 30 rpx;
background : #e55850 ;
min-width : 400 rpx;
max-width : 700 rpx;
border-radius: 10 rpx;
}
.triangle{
position : fixed ;
content : "" ;
right : 11 rpx;
top : 96 rpx;
width : 0 ;
height : 0 ;
border-top : 16 rpx solid transparent ;
border-bottom : 16 rpx solid transparent ;
border-left : 20 rpx solid #e55850 ;
}
.banner-title{
height : 48 rpx;
line-height : 48 rpx;
color : #fff ;
font-size : 28 rpx;
padding : 0 30 rpx;
font-weight : 200 ;
width : calc( 100% - 72 rpx);
}
.banner-close{
width : 70 rpx;
height : 90 rpx;
}
.banner-close cover-image{
width : 60 rpx;
height : 60 rpx;
}
.br{
width : 1px ;
height : 42 rpx;
background : #fff ;
}
.start- center {
display : flex;
justify- content : flex-start;
align-items: center ;
}
|
var app = getApp();
Page({
data: {
banner: null ,
},
load() {
setTimeout(() => {
this .setData({
banner: {
title: " 论语感悟" ,
intro: "领略中国传统文化魅力,和于丹老师一起学习儒家经典。" ,
url: "https://wws.ximalaya.com/wws-lib/book/index/single/3/8075?libId=3676&dist=oEZ0yd"
}
})
}, 5000)
}
})
|
cover-view中用cover-view包裹文本,文本显示不出来,去除包裹文本的cover-view时文本显示;
即节点.banner-title包裹文本,文本不显示,去除节点.banner-title,文本显示
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)