我在我的网站上使用了 disqus,并添加了一个按钮来显示/隐藏评论。该按钮在 Chrome、Opera(我猜还有 IE)上工作正常,但在 Firefox 上失败。
它失败了,因为当我点击按钮时,我没有显示带有评论的 div。div 似乎没有大小。如果我更改窗口浏览器大小... \°/ 我会看到评论!为什么 ?
<p id="commentsButton">
<button id="buttonComment" onclick="toggleComments()">
Commentaires</button>
</p>
<script type="text/javascript">
function toggleComments(){
if (document.getElementById("comments").style.display == "none"){
document.getElementById("comments").style.display="inline";
} else {
document.getElementById("comments").style.display="none";
}
}
</script>
似乎 disqus ifame 有风格
style="height: 0px !important
我能做些什么 ?