UNPKG

load-styles

Version:

Add a CSS <style> tag to the document's <head> node

21 lines (20 loc) 509 B
<!DOCTYPE html> <html> <title>load-styles test</title> <script type="text/javascript" src="build/build.js"></script> <body> <div id="foo">This div should be red.</div> <script type="text/javascript"> var loadStyles = require('load-styles'); loadStyles( '#foo {' + ' width: 100px;' + ' height: 100px;' + ' background-color: red;' + ' text-align: center;' + ' font-size: 9px;' + '}' ); </script> </body> </html>