csstest.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <script src="js/codemirror.js" type="text/javascript"></script>
  4. <title>CodeMirror: CSS demonstration</title>
  5. <link rel="stylesheet" type="text/css" href="css/docs.css"/>
  6. </head>
  7. <body style="padding: 20px;">
  8. <p>Demonstration of <a href="index.html">CodeMirror</a>'s CSS
  9. highlighter.</p>
  10. <div class="border">
  11. <textarea id="code" cols="120" rows="30">
  12. /* Some example CSS */
  13. @import url("something.css");
  14. body {
  15. margin: 0;
  16. padding: 3em 6em;
  17. font-family: tahoma, arial, sans-serif;
  18. color: #000;
  19. }
  20. #navigation a {
  21. font-weight: bold;
  22. text-decoration: none !important;
  23. }
  24. h1 {
  25. font-size: 2.5em;
  26. }
  27. h2 {
  28. font-size: 1.7em;
  29. }
  30. h1:before, h2:before {
  31. content: "::";
  32. }
  33. code {
  34. font-family: courier, monospace;
  35. font-size: 80%;
  36. color: #418A8A;
  37. }
  38. </textarea>
  39. </div>
  40. <script type="text/javascript">
  41. var editor = CodeMirror.fromTextArea('code', {
  42. height: "350px",
  43. parserfile: "parsecss.js",
  44. stylesheet: "css/csscolors.css",
  45. path: "js/"
  46. });
  47. </script>
  48. </body>
  49. </html>