当我将HTML元素彼此相邻显示时,我有一个要求,
我正在使用angularjs,当我在HTML标记中使用ng-bind-html时,它的下一个元素总是出现在新行中。我想使元素彼此相邻出现。
有人可以帮助我解决此问题吗?我已经创建了一个小样https://plnkr.co/edit/Bq3x4hw5L1MNkLoJW8LQ?p=preview

我期望结果是

I am an HTMLstring with links! and other stuff Sai


但它总是产生

I am an HTMLstring with links! and other stuff

Sai

最佳答案

这是CSS问题,只需修改以下代码

<div style="display:flex;">
  <p ng-bind-html="myHTML" style="margin: 0;"></p> <span>Sai</span>
</div>

10-06 07:43
查看更多