我将如何内联以下博客文章示例。我希望标签显示在标题内,这是代码:
<div class="blog-title" >Title test #1</div>
<div class="blog-tag" >
<span class="label label-warning ">Event</span></div>
<div class="blog-author">Author: Jareddlc</div>
<div class="blog-date">posted: Wednesday, June 12, 2013 7:11:00 PM</div>
<pre>Testing text that goes inside the body</pre>
<div class="blog-program">tag: ENG</div>
<hr style="border-top: 1px dotted #b0b0b0;border-bottom: 0px">
我正在用 jquery 动态构建它:
var title = "<div class=\"blog-title\" >"+post.title+"</div>";
var tag = "<div class=\"blog-tag\" ><span class=\"label label-warning \">"+post.tag+"</span></div>";
var author = "<div class=\"blog-author\">Author: "+post.author+"</div>";
var date = "<div class=\"blog-date\">posted: "+formatDate(post.date)+"</div>";
var body = "<pre>"+post.body+"</pre>";
var program = "<div class=\"blog-program\">tag: "+post.program+"</div>";
var footer = "<hr style=\"border-top: 1px dotted #b0b0b0;border-bottom: 0px\">";
var entry = title+tag+author+date+body+program+footer;
有没有办法用引导程序做到这一点?或者我该怎么做?
更新并以标题为中心