Tumblr创建了我不想要的段落

时间:2012-04-18 14:51:34

标签: jquery tumblr paragraph

我在文本中使用了Jquery脚本和Divs的组合。 Tumblr自动将段落放在隔离文本周围,从而在我的链接后面创建一个空间。即使我在html模式下手动删除它们也会发生这种情况。

怎么能解决这个问题? 非常感谢任何答案。

我希望它看起来像这样:
Lorem Ipsum只是印刷和排版行业的虚拟文本 链接1 链接2

但最终看起来像这样:
Lorem Ipsum只是印刷和排版行业的虚拟文本链接1 链接2

参见示例:http://roingbaer.com

tumblr之后的HTML搞砸了:

<p>Lorem Ipsum is simply dummy</p>
<div class="hover"><a href="http://example.com">text</a>
<div class="front"><img src="http://images.roingbaer.com/ludvig.png" /></div>
</div>
<p>, of the printing and typesetting industry.</p>
<div class="hover">Link 1
<div class="front"><img src="http://24.media.tumblr.com/tumblr_lyz7fjMdnN1rp3eymo1_r2_500.jpg" /></div>
<div class="back"><img src="http://24.media.tumblr.com/tumblr_lyz7fjMdnN1rp3eymo1_r2_500.jpg" /></div>
</div>
<p>,</p>
<div class="hover">Link 2
<div class="front"><iframe frameborder="0" height="233" src="http://www.youtube.com/embed/VMeXGE_a8Gg" width="400"></iframe></div>
<div class="back"><iframe frameborder="0" height="480" src="http://www.youtube.com/embed/VMeXGE_a8Gg" width="853"></iframe></div>
</div>

使用Javascript:

$(".front").each(function() {
 var right = Math.floor(Math.random()*800);
 var top = Math.floor(Math.random()*500);

 $(this).css({'margin-right': right});
 $(this).css({'margin-top': top});
});

hoverdiv = $("div.hover")

hoverdiv.on("hover", function() {
$(this).children(".front").show()
});
hoverdiv.on("mouseleave", function() {
$(this).children(".front").hide()
})
hoverdiv.on("click", function() {
$(this).children(".back").toggle()
$(this).children(".front").hide()
});

CSS

.back { 
display:none;
width:100%;
height:100%;
position:fixed;
top:0;
text-align:right;
}

.front
{ 
display:none;
max-height:200px;
max-width:auto;
position:fixed;
z-index:-50;
top:0;
right:100px;
}

.hover { 
cursor:pointer;
margin:0;
padding:0;
font-style:italic;
display:inline;
}

相关的Tumblr代码:

<div id="content">
<!-- Loops for each post-type -->
{block:Posts}
  <div class="post {TagsAsClasses}">
    <div class="post-header">
{block:Text}
      <p class="post-metadata">
      </p>
    </div> <!-- end post-header -->

              <div class="text">
                        <h3>{Title}</h3>

      {Body}
    </div>
    {/block:Text}

0 个答案:

没有答案
相关问题