而不是从左到右,我喜欢被追加的句子,从右向左移动,同时被向上推。查看我更新的fiddle;)...
<-- Essentially I want the words to just get pu
-shed in this direction <------------------------------------------------------------
------- <-- as I continue to append more and more words to the end of this #span. Like
a screw just being unscrewed...?
答案 0 :(得分:2)
您可以在段落中使用元素div
。 div
应该有width
或left-margin
它看起来像http://jsfiddle.net/wmqFL/3/。如果您愿意,可以动态地创建div
。
答案 1 :(得分:0)
只需将其添加到p(CSS): -
p {
text-align:right;
}
HTML: -
<button id="Append">Add Text</button>
<p>This is a paragraph</p>
JQUERY: -
$(document).ready(function(){
$("#Append").click(function(){
$("p").append("<span> Word </span>");
});
});
选中此FIDDLE