04-2.vue 670 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class="four">
  3. <span class="text">foo</span>
  4. <css-grid-common-grid/>
  5. <span class="text">bar</span>
  6. </div>
  7. </template>
  8. <style lang="less" scoped>
  9. @or: /;
  10. .four {
  11. .container {
  12. display: inline-grid;
  13. grid-template-columns: 100px 100px 100px;
  14. grid-template-rows: 100px 100px 100px;
  15. & > div {
  16. min-height: 100px;
  17. &:nth-child(1) {
  18. grid-column: 1 @or 3;
  19. grid-row: 1 @or 3;
  20. }
  21. &:nth-child(4) {
  22. grid-column: 3 @or 3;
  23. grid-row: 2 @or 4;
  24. }
  25. &:nth-child(9) {
  26. grid-column: 1 @or 5;
  27. }
  28. }
  29. }
  30. }
  31. </style>