html - 将文本拖放到 2 行上 - Ionic 1

标签 html css ionic-framework

我正在努力将这个 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/

相关文章:

java - Cordova 安卓开发 : Looking for OTG cable options for debugging with peripherals connected

android - 更改Android和IOS推送通知状态栏的图标

html - 将固定的 div 对齐到可变宽度 TD 的右上角

javascript - 菜单 anchor 栏无法正常工作(fullpage.js)

css - 未加载自定义图标字体

html - margin 底部不起作用

javascript - Angular JS/IONIC 读取 JSON 文件

javascript - 隐藏选择字段中的额外数据?

javascript - 如何在每个 session 的一页中仅触发一次 jquery 函数?

html - Bootstrap 3 修复了具有三个输入组的输入的边界半径