2017-02-16 54 views
0

我的代码是:如何设置图像与文本之间的间距在A​​S3的TextFlow

htmlMarkup:XML = 
      <TextFlow whiteSpaceCollapse="preserve" version="3.0.0" xmlns="http://ns.adobe.com/textLayout/2008"> 
       <p><font face="Arial" size="18"><span>TLF 2.0 will <span class="word">include</span> support for Floats. This feature is currently under development,</span> 
        <span> so the final form may change, but what follows is a description of how it works now. We are </span> 
        <img height="auto" width="auto" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Ash_Tree_-_geograph.org.uk_-_590710.jpg/220px-Ash_Tree_-_geograph.org.uk_-_590710.jpg" align="left"/> 
        <span>so the final form may change, but what follows is a description of how it works now. We are </span> 
        <span>very interested in feedback on this feature, so please let us know how it works for you, </span> 
        <span>very interested in feedback on this feature, so please let us know how it works for you, </span> 
        <span>and if you have any suggestions for improvements.</span></font> 
       </p> 
      </TextFlow>; 
var textFlow:TextFlow = TextConverter.importToFlow(htmlMarkup, TextConverter.TEXT_FIELD_HTML_FORMAT); 

运行这段代码,图像和文字是封闭的,没有空间。但是我想用白色像素将它们分开。我尝试使用css标签“填充”,但没有效果。

回答

0

只需在要显示空格的HTML中添加&nbsp;个字符即可。

<span>text here</span>&nbsp;&nbsp;&nbsp;<img....> 
相关问题