我似乎无法让 jQuery.css() 接受 hsla() 值。传递颜色值不是可接受的格式吗?这是我尝试过的:
// the below variable outputs a variable value with the following format
// hsla(131, 10%, 100%, 1.0)
var finalcolor = "hsla(" +colx +", " +coly +"%, " +"100%, " +"1.0)";
$('#target-div').css('background', finalcolor);