HTML5 video element width and height attributes question -


can html5 video elements width , height attributes have pixel , percentage value?

if these values allowed?

do have add percentage , pixel prefixes @ end of value?

based on w3c specification width , height define video size in css pixels, not percentages. setting % value won't work.

<!-- no `px` @ end of value css --> <video width="980" height="560" ... > ... </video> 

it’s best specify height , width attributes page doesn’t need reflow. if pixel values doesn't work you, don't specify video dimension attributes , instead use style attributes specify height , width in percentage values.

<!-- let's supposed want video adjust size of parent element --> <video style="outline:none; width:100%; height:100%;" ... > ... </video> 

if don't specify dimensions @ all, video display @ original size.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -