html - Maximum size of canvas element -
i tried search didn't found suitable answer.
want create canvas users can draw on it.
read before there no option set canvas size in percent.
need give fixed value in px
, question is:
which width size suite resulution without scrolling horzintally ?
depends on users going use canvas , going used for. recommend following:
@media (min-width: 300px) { .mycanvas{ width:300px; height:533px; } } /*large phone size*/ @media (min-width: 600px) { .mycanvas{ width:600px; height: 1066px; } } /*tablet , standard size*/ @media (min-width: 1920px) { .mycanvas{ width:1920px; height:1080px; } }
unfortunately, above code won't work (which bummer) width , height need defined in html tag, can still use these sizes scaling purposes depending on you're designing canvas for.
Comments
Post a Comment