html - Specify dimensions for canvas element in jQuery -


see below code. how specify width , height within these lines?

specifying width , height using css not work.

wrapper.append(             $('<canvas />', { class: 'canvasclass', id: 'celement' })         ); 

since canvas accepts width , height attribute

try use,

wrapper.append(   $('<canvas />', { class: 'canvasclass', id: 'celement' ,width:200, height:200 }) ); 

Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -