0

创建新的 img 持有者时:

<img src="holder.js/200x75/industrial/text:this text is too long for only one row">

一行中没有足够的空间来容纳文本,而且我无法掌握如何换行换行。

有人有想法吗?

谢谢

4

2 回答 2

0

现在添加了换行符:https ://github.com/imsky/holder#text

<img data-src="holder.js/300x200?text=Add \n line breaks \n anywhere.">
于 2016-05-25T16:53:01.483 回答
0

检查您的语法和设置。或者尝试更新Holder.js

Holder会自动为超出图像边界的文本添加换行符。

此代码可以正常工作:

<script src="https://cdn.rawgit.com/imsky/holder/master/holder.js"></script>

<img src="holder.js/200x75/industrial?text=this text is too long for only one row">

于 2016-05-25T22:44:06.350 回答