0

而不是从左到右,我希望句子被追加,从右到左移动,同时被向上推。看看我更新的小提琴;)......

                                      <-- 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...?   
4

2 回答 2

2

div您可以在段落内使用元素。div应该有一个或width一个left-margin

它看起来像这样http://jsfiddle.net/wmqFL/3/。如果你愿意,你可以div动态创建。

于 2013-07-07T07:43:26.190 回答
0

只需将其添加到 p(CSS):-

p {
    text-align:right;
}

HTML:-

<button id="Append">Add Text</button>

<p>This is a paragraph</p>

查询:-

$(document).ready(function(){
  $("#Append").click(function(){
    $("p").append("<span> Word </span>");
  });
});

检查这个小提琴

于 2013-07-07T08:15:37.973 回答