본문 바로가기

Dev/web

[javascript] ghost margin in canvas

https://stackoverflow.com/questions/9878090/eliminate-ghost-margin-below-html5-canvas-element

 

Eliminate ghost margin below HTML5 canvas element?

When we create an HTML5 canvas element, a ghost margin appears below the canvas element even though we set the margin and padding to 0. Example: http://jsfiddle.net/yvbmd/ We tried a variety of t...

stackoverflow.com

이런상황임 

 

이건 그냥 canvas가 기본이 block 요소가 아닌 inline요소 여서 그럼 display: block 하던가 아니면 

저기 답글 처럼 하면 됨.