zoukankan      html  css  js  c++  java
  • sass mixin 持续更新

    控制多行显示省略号...

    //文字溢出省略号
    @mixin coveText($num:1)
    { @if $num == 1{ white-space: normal; overflow: hidden; text-overflow: ellipsis; } @else{ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: $num; overflow: hidden; } }

     0.5像素border

    @mixin borderPart($color,$position:null,$type:solid) {
      position: relative;
      &:before {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        top: 0;
        transform-origin: 0 0;
        transform: scale(0.5, 0.5);
        box-sizing: border-box;
        @if $position == null {
          border: 1px $type $color;
        } @else if $position == top {
          border-top: 1px $type $color;
        } @else if $position == left {
          border-left: 1px $type $color;
        } @else if $position == right {
          border-right: 1px $type $color;
        } @else if $position == bottom {
          border-bottom: 1px $type $color;
        }
      }
    }
  • 相关阅读:
    python返回函数与匿名函数
    Session&Cookie
    write RE validation
    hello2 source anaylis
    Filter
    Development descriptor
    web.xml配置详解
    Annotation
    injector
    container
  • 原文地址:https://www.cnblogs.com/lvyueyang/p/7443126.html
Copyright © 2011-2022 走看看