点击登录

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

墨伊slowpot

Lv.1
社区会员
透明按钮翻了开发文档没找到然后试了试用css的transparent也没用图片用的透明的也没用有没有大佬出来解答下怎么设置透明按钮
 
是不是设置了背景颜色?好像设置了颜色会覆盖掉图片
 
有没有大佬能帮我看下这按钮哪出了问题
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 自动推荐的广告,与本站无关,不对其真实性与可靠性负责

相似主题

Home 首页
Home 资源
News 发现
Account 我的
顶部