jQuery的:
var scale_width = 1;
var scale_height = 1.5;
$(".english_canvas.unit_11").css("transform","scale('"+scale_width+"','"+scale_height+"')");
HTML:
<div style="width: 210px; height: 210px; background-color: #fff" class="english_canvas unit_11"></div>
答案 0 :(得分:1)
$(".english_canvas.unit_11").css("transform","scale("+scale_width+","+scale_height+")");
答案 1 :(得分:0)
<div style="width: 210px; height: 210px; background-color: #000" class="english_canvas unit_11"></div>
var scale_width = 1;
var scale_height = 3.5;
$(".english_canvas.unit_11").css({
"-webkit-transform":"scale("+scale_width+","+scale_height+")"})