样式值的构造字符串不起作用

Constructed string for style value not working

function tickleTux() {

var tuxImg = document.getElementById('tux');

tuxImg.style.transition = "transform .5s";

tuxImg.addEventListener('click', itTickles, false);

function itTickles() {

    var addRotation = 10;

    var rotationValue = '"' + 'rotate' + '(' + addRotation + 'deg' + ')' + '"' 

    tuxImg.style.transform = rotationValue;

     console.log(rotationValue);  
}

基本上,这会为 img 添加旋转样式并使其旋转。

只是想知道为什么将值添加到转换属性以这种方式不起作用。为什么?

console.log命令打印出:"rotate(10deg)"

那么是什么阻止了它的运行?某种规则?

感谢您的帮助。

该值不应包含 "

var rotationValue = 'rotate(' + addRotation + 'deg)';