动态菜单和动态路由的 antd pro

utils.less 842B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .textOverflow() {
  2. overflow: hidden;
  3. text-overflow: ellipsis;
  4. word-break: break-all;
  5. white-space: nowrap;
  6. }
  7. .textOverflowMulti(@line: 3, @bg: #fff) {
  8. overflow: hidden;
  9. position: relative;
  10. line-height: 1.5em;
  11. max-height: @line * 1.5em;
  12. text-align: justify;
  13. margin-right: -1em;
  14. padding-right: 1em;
  15. &:before {
  16. background: @bg;
  17. content: '...';
  18. padding: 0 1px;
  19. position: absolute;
  20. right: 14px;
  21. bottom: 0;
  22. }
  23. &:after {
  24. background: white;
  25. content: '';
  26. margin-top: 0.2em;
  27. position: absolute;
  28. right: 14px;
  29. width: 1em;
  30. height: 1em;
  31. }
  32. }
  33. // mixins for clearfix
  34. // ------------------------
  35. .clearfix() {
  36. zoom: 1;
  37. &:before,
  38. &:after {
  39. content: ' ';
  40. display: table;
  41. }
  42. &:after {
  43. clear: both;
  44. visibility: hidden;
  45. font-size: 0;
  46. height: 0;
  47. }
  48. }