我正在努力将这个 plunker 中以粗体、黑色字体显示的文本超过 2 行,同时防止它侵犯左侧的圆形图像:
https://plnkr.co/mhVQPrVI52t2cmD5hAJW
对于那些屏幕较大的人来说,特别是“这是一个很长的事件名称,需要超过 2 行并在进入图像下方之前停止”的文本:
<h2 style="text-align: center; line-height: 2.5; font-weight: bold;">This is a very long event name that needs to go over 2 lines and stop before going under the image</h2>
到目前为止,我已经尝试了多种方法,但每一种方法都会破坏 View 的其余部分。我是否需要重新构造整个容器才能实现此结果?
编辑:更新了链接。
最佳答案
也许我不明白这个问题,但尝试将元素 'a' 和 'h2' 的 css 更改为:
<a class="item item-thumbnail-left" style="
line-height: 2.5;
border-bottom: solid 1px #F2EFEF;
background-color: #F2EFEF;
padding-left: 130px;
" >
<h2 style="text-align: center;
line-height: 2.5;
font-weight: bold;
white-space: pre-line;">This is a very long event name that needs to go over 2 lines and stop before going under the image</h2>
关于html - 将文本拖放到 2 行上 - Ionic 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44739405/