Change the background colour of a Raphael "Label"

If I create a [`Label`][1] using Raphael, the default style is a black block with white text. How can I change the background box colour, but not the text colour? I've tried: paper.label(x, y, value).attr("fill", colour) but that also fills the text and I end up with invisible text. I also can't simply change the default colour in [this function][2] because I need to have a few different ones depending on a line that it's added to: ![enter image description here][3] [1]: [2]: [3]:

以上就是Change the background colour of a Raphael "Label"的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准