search

Home  >  Q&A  >  body text

html5 - canvas画图多出3px问题


为什么会多出3px?

巴扎黑巴扎黑2827 days ago545

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:49:39

    Because canvas is an inline replacement element by default, and the 3px is the distance between its baseline and the bottom of the line.
    Set his display to block to solve this problem.

    reply
    0
  • Cancelreply