backface-visibility 属性在存在内嵌元素时显示错误

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:20 683 0 全屏看文

AI助手支持GPT4.0

backface-visibility 属性在存在内嵌元素时显示错误
框架类型 问题类型 终端类型 微信版本 基础库版本
小程序 Bug 微信安卓客户端 7.0.17 2.9.0

卡牌正反面的需求。等效代码在 chrome 是没有问题的,但在小程序开发工具和安卓上有问题。(iOS 没测)

具体问题:如果卡牌正反面只是图片,正反显示都没问题。如果卡牌正反面是容器,里面有图片和文字。卡牌翻转过来,正反面的文字都显示了。预期只显示某一面的文字。

// wxml<view class="card-wrapper {{ status ? 'show-cover' : '' }}">  <view class="cover-image">    <image class="card-image" src="{{ coverImage }}" />    <text class="card-text">{{ text }}</text>  </view>  <view class="back-image">    <image class="card-image" src="{{ backImage }}"></image>    <text class="card-text">{{ text }}</text>  </view></view>// wxss.card-wrapper {  width100%;  height100%;  position: relative;  transform-style: preserve-3d;}.card-wrapper.show-cover {  transform: rotateY(180deg);}.cover-image,.back-image {  width100%;  height100%;  position: absolute;  left0;  top0;  backface-visibility: hidden;}.cover-image {  transform: rotateY(180deg);  transform-origin: center;}/* .back-image {  backface-visibility: hidden;} */.card-image {  width100%;  height100%;}.card-text {  display: block;  width100%;  line-height1;  margin-top: -120rpx;  text-align: center;  color: white;  font-size36rpx;  text-shadow:1px 2px 4px rgba(27,95,168,0.6);}.back-image .card-text {  opacity0.4;  margin-top: -128rpx;}


Framework type problem type terminal type wechat version basic library version applet bug wechat Android client 7.0.17 2.9.0 card front and back requirements. The equivalent code has no problem in chrome, but it has problems in applet development tools and Android. (IOS not tested) specific problem: if the front and back of the card are just pictures, the front and back display is OK. If the front and back of the card are containers, there are pictures and text inside. The card is turned over and the words on the front and back are displayed. Only one side of the text is expected to be displayed. / / wxml          {{ text }}            {{ text }}  // wxss.card -wrapper {  width: 100%;  height: 100%;  position: relative;  transform-style: preserve-3d;}.card- wrapper.show -cover {  transform: rotateY(180deg);}.cover-image,.back-image {  width: 100%;  height: 100%;  position: absolute;  left: 0;  top: 0;   backface-visibility: hidden;}.cover-image {  transform: rotateY(180deg);  transform-origin: center;}/* .back-image {  backface-visibility: hidden;} */.card-image {  width: 100%;  height: 100%;}.card-text {  display: block;  width: 100%;  line-height: 1;  margin-top: -120rpx;  text-align: center;   color: white;  font-size: 36rpx;  text- shadow:1px  2px 4px rgba(27,95,168,0.6);}.back-image .card-text {  opacity: 0.4;  margin-top: -128rpx;}

回答:

社区技术运营专员-CJiang:

麻烦提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

-EOF-

AI助手支持GPT4.0


三叔工具箱

摸鱼人热门新闻聚合

开发者在线工具

第三方支付技术请加QQ群

相关文章
提交审核填写的相关信息游戏中没有涉及怎么办?
服务商模式下进行下单测试,显示受理关系不存在?
部分ios加载远程服务器资源报错加载超时?麻烦了解的指导一下
企业客户联系插件为什么不能在小程序内点击按钮直接进企业微信外部群 ?
微信小游戏 wx.createVideo播放视频的次数到达一定数量,就会返回解码失败?
随便看看
微信公众号免300认证教程 4856
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 3880
小程序广告组件通过审核,但是小程序内没有显示广告? 3955
企业微信通讯录账号被管理员误/恶意删除,怎么办? 7888
问题? 7117
如何快速搭建抽奖助手小程序(无需代码知识) 4928
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 5888
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5424
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5121
如何解决渲染层网络错误Failed to load media? 16380