这应该工作:
var style = $('<style>.class { background-color: blue; }</style>');
$('html > head').append(style);
通过jQuery为将来创建的元素添加CSS规则
这应该工作:
var style = $('<style>.class { background-color: blue; }</style>');
$('html > head').append(style);