I am creating canvas element with javascript like
Can=document.createElement("canvas");
Then I want to set the width of this element in centimeters. I am doing
Can.style.width="8cm";
Can.style.height="5cm";
I am setting other css properties like,
Can.style.cssText = 'position:relative; top:24px; left:28px; border-radius:30px; float:left; cursor:pointer; box-shadow: 0px 0px 2px 2px black; background-color:#cdcdcd';
But it is not being set. What's is the problem? How to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…