美文网首页
css常用 (手打记不住)

css常用 (手打记不住)

作者: JakeBless | 来源:发表于2021-10-14 10:48 被阅读0次

    /小程序里清除浮动/
    <view style="float:left"></view>
    <view style="clear:both; height: 0"></view>
    或者父容器添加
    .clear::after{display:block; height:0;clear:both; content: ''}

    /浮动/
    .fl{float: left}
    .fr{float: right}
    .clearfix:after{content:"";display:block;height:0;clear:both;visibility:hidden}
    .clearfix{display:inline-block}

    //超过裁剪
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;

    // 裁字行数
    word-break:break-all;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;

    //换行
    word-wrap:break-word;

    //不换行
    white-space:nowrap;

    //自动
    word-wrap: break-word;
    word-break: normal;

    // 黑白
    -webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */
    filter: grayscale(100%);

    // 移动端滚动
    webkit-overflow-scrolling : touch;

    // 画三角

    .san {
      width: 0;
      height: 0;
      border-left: 50px solid transparent;  
      border-right: 50px solid transparent;
      border-bottom: 100px solid #ff0066;
    }
    

    // input placehoder
    input::-webkit-input-placeholder {
    color:rgba(153,153,153,1)!important;
    }
    input:-moz-placeholder{
    color:rgba(153,153,153,1)!important;
    }
    input::-moz-placeholder{
    color:rgba(153,153,153,1)!important;
    }
    input::-ms-input-placeholder{
    color:rgba(153,153,153,1)!important;
    }

    相关文章

      网友评论

          本文标题:css常用 (手打记不住)

          本文链接:https://www.haomeiwen.com/subject/qlkbdktx.html