[关闭]
@nemos 2017-05-06T02:48:13.000000Z 字数 1341 阅读 788

语言转换

web


sass

  1. /************************** 变量 **************************/
  2. $font-stack: Helvetica, sans-serif
  3. $primary-color: #333
  4. body
  5. font: 100% $font-stack
  6. color: $primary-color
  7. /************************** 嵌套 **************************/
  8. nav
  9. ul
  10. margin: 0
  11. padding: 0
  12. list-style: none
  13. li
  14. a
  15. display: block
  16. padding: 6px 12px
  17. text-decoration: none
  18. /************************** 混合 **************************/
  19. =border-radius($radius)
  20. -webkit-border-radius: $radius
  21. -moz-border-radius: $radius
  22. -ms-border-radius: $radius
  23. border-radius: $radius
  24. .box
  25. +border-radius(10px)
  26. //////////////////////////////////////////////////////////
  27. .box {
  28. -webkit-border-radius: 10px;
  29. -moz-border-radius: 10px;
  30. -ms-border-radius: 10px;
  31. border-radius: 10px;
  32. }
  33. /************************** 继承 **************************/
  34. .message
  35. border: 1px solid #ccc
  36. padding: 10px
  37. color: #333
  38. .success
  39. @extend .message
  40. border-color: green
  41. .error
  42. @extend .message
  43. border-color: red
  44. /************************** 运算 **************************/
  45. .container
  46. width: 100%
  47. article[role="main"]
  48. float: left
  49. width: 600px / 960px * 100%
  50. aside[role="complementary"]
  51. float: right
  52. width: 300px / 960px * 100%

参考

官方教程


coffee

参考


jade

  1. pageTitle = "Jade Rocks!"
  2. doctype 5
  3. html(lang="en")
  4. head
  5. title= pageTitle
  6. script
  7. console.log("hi");
  8. body
  9. p.greeting Hello, World!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Jade Rocks!</title>
  5. <script>console.log("hi");
  6. </script>
  7. </head>
  8. <body>
  9. <p class="greeting">Hello, World!</p>
  10. </body>
  11. </html>

参考

learnjade
pug

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注