title: Using CSS within javascript
body: <p>I am trying to load css from javascript. I have a little icon I need styles for that my users display on their site through my script tag like <code>&lt;script src="mywebiste.com/api.js"&gt;&lt;/script</code></p>
  
  <p>Rather than doing inline styles like this:</p>
  
  <pre><code>document.body.innerHTML +=
  '&lt;div style="position:absolute;width:10%;height:10%;opacity:0.3;
               z-index:100;background:#000;"&gt;
  &lt;/div&gt;';
  </code></pre>
  
  <p>How can I load css styles from javascript? How do widgets like intercom.com do it?</p>