mixin.scss 673 B

123456789101112131415161718192021222324252627282930313233343536
  1. // 混淆函数
  2. // 处理倍图
  3. @mixin bg-image ($url) {
  4. background-image: url($url + "@2x.png");
  5. //@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
  6. // background-image: url($url + "@3x.png");
  7. //}
  8. }
  9. // 清除浮动
  10. @mixin clearfix {
  11. &:after {
  12. visibility: hidden;
  13. display: block;
  14. font-size: 0;
  15. content: " ";
  16. clear: both;
  17. height: 0;
  18. }
  19. }
  20. // 超出省略号
  21. @mixin ellipsis {
  22. overflow: hidden;
  23. text-overflow:ellipsis;
  24. white-space: nowrap;
  25. }
  26. // 多行超出省略号
  27. @mixin ellipsisLine ($line:2) {
  28. display: -webkit-box;
  29. -webkit-box-orient: vertical;
  30. -webkit-line-clamp: $line;
  31. overflow: hidden;
  32. }