zoukankan      html  css  js  c++  java
  • css控制超出文本...

    1.单行省略

      width:100px;

      white-space: nowrap;

      overflow: hidden; 

      text-overflow: ellipsis;

      -o-text-overflow: ellipsis;

    2.多行省略

      overflow:hidden;

      text-overflow:ellipsis;

      display:-webkit-box;

      -webkit-box-orient:vertical; 

    3.限制多少行...

      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;

    ---------------------------------------

    uniapp中

      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 1; //可设置显示的行数
      line-clamp: 1;
      -webkit-box-orient: vertical;

  • 相关阅读:
    155. 最小栈
    160. 相交链表
    PAT 1057 Stack
    PAT 1026 Table Tennis
    PAT 1017 Queueing at Bank
    PAT 1014 Waiting in Line
    PAT 1029 Median
    PAT 1016 Phone Bills
    PAT 1010 Radix
    PAT 1122 Hamiltonian Cycle
  • 原文地址:https://www.cnblogs.com/swt-axios/p/13469700.html
Copyright © 2011-2022 走看看