index.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. $aa: #0f0;
  2. // var aa =
  3. $box1: 3px !default;
  4. // @import './reset.scss';
  5. @mixin flower($xx,$yy) {
  6. width: 300px;
  7. height: 300px;
  8. color: $xx;
  9. background-color: $yy;
  10. border: 3px solid plum;
  11. }
  12. @mixin vase($cc...) {
  13. box-shadow: $cc;
  14. }
  15. @mixin water($dd:10px) {
  16. font-size: $dd
  17. }
  18. .tea {
  19. color: aqua;
  20. // font-style: italic;
  21. // font-weight: lighter;
  22. font: {
  23. weight: lighter;
  24. style: italic;
  25. }
  26. }
  27. %sun {
  28. color: #ff0
  29. }
  30. @function light($rr) {
  31. @return $rr * 2;
  32. }
  33. @import url('./reset.css');
  34. * {
  35. margin: 0;
  36. padding: 0;
  37. list-style: none;
  38. text-decoration: none;
  39. box-sizing: border-box;
  40. }
  41. // 这是标题的标签
  42. /*
  43. 今天天气真好
  44. */
  45. h1 {
  46. color: #f00;
  47. $box2: 10px !global;
  48. @extend .tea;
  49. }
  50. ul {
  51. // width: 100px + 500px;
  52. width: (1600/2)+px;
  53. // width: 8 * 100px;
  54. // width: 900px - 100px;
  55. height: #{light(400)}px;
  56. border: $box2 dashed $aa;
  57. li {
  58. color: #f00 + #0f0;
  59. font: {
  60. size: 30px;
  61. weight: bold;
  62. }
  63. &:hover {
  64. color: #ff0;
  65. }
  66. &:nth-child(2):hover {
  67. color: #f00;
  68. }
  69. &:nth-child(3) {
  70. @include flower(blue,yellow);
  71. @include vase(30px 20px 10px #f00);
  72. @include water();
  73. }
  74. &:last-child {
  75. @extend %sun;
  76. }
  77. }
  78. }