• 游客,欢迎来到米坛社区。
    米坛社区是大型中文智能穿戴设备交流社区,在这里交流你的极客思想,共同建造我们的智能世界
    为了更加方便的获取支持与帮助,请加入米坛社区官方QQ频道

问答 大佬们透明按钮怎么设置

墨伊slowpot

LV0
普通成员
UID
85404
2022-06-11
53
23
透明按钮翻了开发文档没找到然后试了试用css的transparent也没用图片用的透明的也没用有没有大佬出来解答下怎么设置透明按钮
 

zzt741

LV7
🔥社区作者
普通成员
UID
75550
2021-10-12
224
1,786
是不是设置了背景颜色?好像设置了颜色会覆盖掉图片
 

墨伊slowpot

LV0
普通成员
UID
85404
2022-06-11
53
23
没设背景颜色,就直接用的press_src和normal_src,导出后是一个黑色的按钮
 

墨伊slowpot

LV0
普通成员
UID
85404
2022-06-11
53
23
有没有大佬能帮我看下这按钮哪出了问题
JavaScript:
const realtrue = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","0"];
var nowtrue = realtrue;
nowtrue.sort(function(){
    return (0.5-Math.random())
});
            //左按钮
            function leftButtonClick(lbutton){
              nowtrue.forEach(function(point,turn){
                if(point == "0"){
                  var zeropoint = turn;
                  zeropoint = Number(zeropoint);
                }
              });
              if(turn != 3 && turn != 7 && turn != 11 && turn != 15){
                var leftpoint = zeropoint + 1;
                nowtrue.splice(zeropoint - 1,1, ...nowtrue.splice(leftpoint - 1,1, nowtrue[zeropoint - 1]))
                showme()
              }else{
                var leftpoint = undefined;
              }
            }

            const lbutton = hmUI.createWidget(hmUI.widget.BUTTON,{
              x: 32,
              y: 217,
              normal_color: 0xef5350,
              text: 'button',
              press_src: "himg/8.png",
              normal_src: "himg/8.png",
              w: -1,
              h: -1,
              click_func: leftButtonClick
            })

            
            function rightButtonClick(rbutton){
              nowtrue.forEach(function(point2,turn2){
                if(point2 == "0"){
                  var zeropoint2 = turn2;
                  zeropoint2 = Number(zeropoint2);
                }
              });
              if(turn % 4 != 0 ){
                var rightpoint = zeropoint2 - 1;
                nowtrue.splice(rightpoint - 1,1, ...nowtrue.splice(zeropoint2 - 1,1, nowtrue[rightpoint - 1]))
                showme()
              }else{
                var rightpoint = undefined;
              }
            }
            //右按钮
            const rbutton = hmUI.createWidget(hmUI.widget.BUTTON,{
              x: 122,
              y: 217,
              press_src: "himg/1.png",
              normal_src: "himg/1.png",
              w: -1,
              h: -1,
              click_func: rightButtonClick
            })
 

*这是一则由 Google AdSense 自动推荐的广告,与本站无关,不对其真实性与可靠性负责