将鼠标悬停在按钮JavaScript上时显示文本

时间:2018-12-23 09:59:53

标签: javascript css

我想在鼠标悬停在startbtn上时显示一些文本。请参见下面的JS代码:

this.startBtn = new Button(this.game, this.world.width / 4, this.world.centerY, 'Play', styles.btnLargeMain)
this.startBtn.onmouseover="HeHe"
this.startBtn.onInputUp.add(this.startGame, this)
this.startBtn.position.x = this.world.width / 2 - logo.width / 2 + this.startBtn.width / 2
this.startBtn.position.y = this.world.centerY + this.startBtn.height / 2 

styles.btnLargeMain将链接到

btnLargeMain: {
    frame: 'yellow',
    sheet: 'ui',
    bitmap: true,
    font: 'kenvector28',
    size: 28,
  },

0 个答案:

没有答案
相关问题