css & multi line words & ellipsis

bug

.news-card-content-title {
width: 100%;
height: 0.8rem;
line-height: 0.4rem;
display: block;
overflow: hidden;
/* white-space: nowrap; */
text-overflow: ellipsis;
max-width: calc(4.8rem);
}

bug


.news-card-content-title {
width: 100%;
height: 0.8rem;
line-height: 0.4rem;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: calc(4.8rem);
}

wanted



solution

css text overflow ellipsis multi-line

https://codepen.io/xgqfrms/pen/qeZpEd

See the Pen Pure CSS multiline text with ellipsis by xgqfrms
(@xgqfrms) on CodePen.


.news-card-content-title {
width: 100%;
height: 0.8rem;
line-height: 0.4rem;
display: block;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
max-width: calc(4.8rem);
overflow: hidden;
text-overflow: ellipsis;
/* white-space: nowrap; */
}


xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


css & multi line words & ellipsis的更多相关文章

  1. css 实现省略号. text-overflow: ellipsis; 同时设置四个属性才可以.

    这个同时需要. text-overflow  ;  overflow  ;  white-space ; width ;  四个属性才可以. <!DOCTYPE html> <htm ...

  2. CSS multi colors circle

    CSS multi colors circle <!DOCTYPE html> <html lang="zh-Hans"> <head> < ...

  3. css delete line text & html del

    css delete line text & html del html <del>¥720</del> demo <span class="ticke ...

  4. CSS基础:text-overflow:ellipsis溢出文本

    <!DOCTYPE html><html> <head> <title> new document </title> <meta na ...

  5. CSS基础:text-overflow:ellipsis溢出文本显示省略号的详细方法_CSS教程

    4要素: width: 125px;  //宽度必须 text-overflow: ellipsis/clip; //省略号或裁剪: white-space: nowrap;//强制内容在一行显示; ...

  6. Python使用XML操作mapnik,实现复杂标注(Multi line text symbolizer)

    test.py import mapnik stylesheet = 'world_style.xml' image = 'world_style.png' m = mapnik.Map(1200, ...

  7. css 设置多行文本的行间距

    css 设置多行文本的行间距 block element span .ticket-card-info{ line-height:16px; display: inline-block; } .tic ...

  8. cssfloat布局以及其他小技巧

    css float 布局以及其他小技巧总结 这篇博文 前面四个部分是关于css 经典布局 如果你已经知道了 可以直接跳过看第六部分 css 的其他小技巧 1.0 左右居中布局 <!DOCTYPE ...

  9. 常用css样式(布局)

    兼容css3新属性 在css3中,我们可以使用prefixfree.min.js这个插件来自动为css3的相关属性加上兼容浏览器属性,使我们不用为每个css3新属性再加上属性(需要用到大量css3的项 ...

随机推荐

  1. (Sql Server)存储过程(转载)

    SQL Server 存储过程 Transact-SQL中的存储过程,非常类似于Java语言中的方法,它可以重复调用.当存储过程执行一次后,可以将语句缓存中,这样下次执行的时候直接使用缓存中的语句.这 ...

  2. H5 的直播协议和视频监控方案

    H5 的直播协议和视频监控方案 一.流媒体主要实现方式 二.流媒体技术 2.1 流媒体 2.2 直播 2.3 流协议 2.3.1 HLS 协议 2.3.2 RTMP 协议 2.3.3 RTSP 协议 ...

  3. jvm 总体梳理

    jvm 总体梳理 1.类的加载机制 1.1什么是类的加载 1.2类的生命周期 1.3类加载器 1.4类加载机制 2.jvm内存结构 JVM内存模型 2.1jvm内存结构 2.2对象分配规则 3.GC算 ...

  4. Microsoft Exchange远程代码执行漏洞(CVE-2020-16875)

    Microsoft Exchange远程代码执行漏洞(CVE-2020-16875) 漏洞信息: 由于对cmdlet参数的验证不正确,Microsoft Exchange服务器中存在一个远程执行代码漏 ...

  5. C语言简介与第一个C语言程序

    一.C语言产生的背景 C语言的出现与操作系统Unix是分不开的.Unix是1969年由美国贝尔实验室的K. Thompson和D. M. Ritchie两人用汇编语言编写,它存在许多不足,因此,需要一 ...

  6. 2019 ccpc秦皇岛

    1006 (dfs) #include <bits/stdc++.h> using namespace std; const int inf = 0x3f3f3f3f; const dou ...

  7. 2014-2015 ACM-ICPC, NEERC, Southern Subregional Contest 题解(PART)(9/13)

    $$2014-2015\ ACM-ICPC,\ NEERC,\ Southern\ Subregional\ Contest$$ A Nasta Rabbara B Colored Blankets ...

  8. Codeforces Round #655 (Div. 2) D. Omkar and Circle

    题目链接:https://codeforces.com/contest/1372/problem/D 题意 给出奇数个数围成的环,每次可以将一个数替换为相邻两个数的和并删除相邻的两个数,问最后余下的数 ...

  9. Educational Codeforces Round 85 (Rated for Div. 2)

    \(Educational\ Codeforces\ Round\ 85\ (Rated\ for\ Div.2)\) \(A. Level Statistics\) 每天都可能会有人玩游戏,同时一部 ...

  10. 洛谷 P2880 [USACO07JAN]Balanced Lineup G (ST表模板)

    题意:给你一组数,询问\(q\)次,问所给区间内的最大值和最小值的差. 题解:经典RMQ问题,用st表维护两个数组分别记录最大值和最小值然后直接查询输出就好了 代码: int n,q; int a[N ...