JavaScript

多行文本显示省略号

2019-09-28  本文已影响0人  剑指流云

直接上代码

.text{
      position: relative;
      display: -webkit-box;
      -webkit-box-orient:vertical;
      width: 500px;
            height: 60px;
            text-overflow: ellipsis;
            word-break: break-all;
            overflow: hidden;
            -webkit-line-clamp: 3;
      background-color: #ccc;
      line-height: 1.25;
    }

webpack打包导致 -webkit-box-orient:vertical;丢失的问题

** 提示:-webkit-box-orient:vertical前后加注释,其余不变 **

.text {
        /*! autoprefixer: off */
        -webkit-box-orient: vertical;
        /* autoprefixer: on */
}
上一篇 下一篇

猜你喜欢

热点阅读