本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.9KB

  1. <!doctype html>
  2. <title>CodeMirror: CSS mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <link rel="stylesheet" href="../../addon/hint/show-hint.css">
  7. <script src="../../lib/codemirror.js"></script>
  8. <script src="css.js"></script>
  9. <script src="../../addon/hint/show-hint.js"></script>
  10. <script src="../../addon/hint/css-hint.js"></script>
  11. <style>.CodeMirror {background: #f8f8f8;}</style>
  12. <div id=nav>
  13. <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
  14. <ul>
  15. <li><a href="../../index.html">Home</a>
  16. <li><a href="../../doc/manual.html">Manual</a>
  17. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  18. </ul>
  19. <ul>
  20. <li><a href="../index.html">Language modes</a>
  21. <li><a class=active href="#">CSS</a>
  22. </ul>
  23. </div>
  24. <article>
  25. <h2>CSS mode</h2>
  26. <form><textarea id="code" name="code">
  27. /* Some example CSS */
  28. @import url("something.css");
  29. body {
  30. margin: 0;
  31. padding: 3em 6em;
  32. font-family: tahoma, arial, sans-serif;
  33. color: #000;
  34. }
  35. #navigation a {
  36. font-weight: bold;
  37. text-decoration: none !important;
  38. }
  39. h1 {
  40. font-size: 2.5em;
  41. }
  42. h2 {
  43. font-size: 1.7em;
  44. }
  45. h1:before, h2:before {
  46. content: "::";
  47. }
  48. code {
  49. font-family: courier, monospace;
  50. font-size: 80%;
  51. color: #418A8A;
  52. }
  53. </textarea></form>
  54. <script>
  55. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  56. extraKeys: {"Ctrl-Space": "autocomplete"}
  57. });
  58. </script>
  59. <p><strong>MIME types defined:</strong> <code>text/css</code>, <code>text/x-scss</code> (<a href="scss.html">demo</a>), <code>text/x-less</code> (<a href="less.html">demo</a>).</p>
  60. <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#css_*">normal</a>, <a href="../../test/index.html#verbose,css_*">verbose</a>.</p>
  61. </article>
上海开阖软件有限公司 沪ICP备12045867号-1