I think it's a better practice to append a "link" tag to the head of your document. If that isn't possible, try to append a "style" tag to the head. Style tags shouldn't be in the body (Doesn't even validate).
Append link tag:
var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.type = 'text/css';
link.href = 'http://example.com/stylesheet.css';
document.head.appendChild(link);
Append style tag:
var style = document.createElement('style');
style.innerHTML = 'body { background-color: #F00; }';
document.head.appendChild(style);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…