index.scss 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // @import './reset.scss';
  2. @import url(reset.css);
  3. $a: plum;
  4. $cc: red !important;
  5. $dd: yellow !default;
  6. $box1: 2px solid #f00;
  7. @mixin vase {
  8. width: 500px;
  9. height: 500px;
  10. color: $cc;
  11. background: $dd;
  12. }
  13. @mixin a1($size) {
  14. font-size: $size;
  15. background: lightblue;
  16. }
  17. @mixin a2($radius: 50%, $color: $dd) {
  18. border-radius: $radius;
  19. box-shadow: 10px 10px 5px $color;
  20. }
  21. // @mixin a2($radius:50%,$color:$dd) {
  22. // border-radius: $radius;
  23. // box-shadow: 10px 10px 5px $color;
  24. // }
  25. // @mixin a3($a,$b,$c,$d) {
  26. // box-shadow: $a $b $c $d;
  27. // }
  28. @mixin a3($shadow...) {
  29. box-shadow: $shadow;
  30. }
  31. .happy {
  32. width: 1000xp;
  33. height: 800px;
  34. border: 4px solid pink;
  35. }
  36. %hi {
  37. width: 800px;
  38. height: 800px;
  39. background: #ccc;
  40. margin: 0 auto;
  41. }
  42. @function world($oo) {
  43. @return $oo*2;
  44. }
  45. .con {
  46. // @extend %hi;
  47. width: 1500px - 1000px;
  48. // width: (1500px / 3);
  49. // width: #{world(400)}px;
  50. height: #{world(500)}px;
  51. background-color: #000 + #0f0;
  52. // @extend .happy;
  53. }
  54. // 单行注释 哈哈哈哈
  55. /*多行注释*/
  56. .box {
  57. width: 500px;
  58. height: 500px;
  59. border: $box1;
  60. $bb: purple !global;
  61. font: {
  62. size: 30px;
  63. weight: bold;
  64. family: "Courier New", Courier, monospace;
  65. style: italic;
  66. }
  67. h1 {
  68. // color: $cc;
  69. // color: $dd;
  70. color: $bb;
  71. span {
  72. color: $cc;
  73. font-size: 15px;
  74. }
  75. }
  76. ul {
  77. li {
  78. color: $a;
  79. &:hover {
  80. color: $cc;
  81. }
  82. }
  83. }
  84. }
  85. .box1 {
  86. @include vase;
  87. @include a1(10px);
  88. @include a2;
  89. @include a3(10px 10px 10px blue);
  90. // @extend .happy;
  91. }
  92. // ul li:hover
  93. // img[alt='www'] {}