0

我对这个完全感到困惑。我有一个 Facebook 按钮,它似乎隐藏了溢出但只在 y 轴上???

你可以在这里看到它:www.new.thebespokeflorist.co.uk/blog只需向下滚动并将鼠标悬停在博客文章下方的 facebook 图标上。

facebook 按钮保存在一个 div 中:

<div class="share-facebook social-noshow" onclick="toggleSocial()">
    <div class="fb-like" data-href="<?php the_permalink() ?>" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="lucida grande"></div>
</div>

CSS是:

.social-show { width: 60px; overflow: auto; }
.social-noshow { width: 0px; overflow: hidden; }
.share-facebook { background: url('http://www.new.thebespokeflorist.co.uk/wp-content/themes/V3 TBF/images/blog/fb.png') left bottom no-repeat; height: 20px; float: left; padding: 0 0 0 30px; transition: width 0.25s ease 0s; }
.share-facebook:hover { width: 90px; transition: width 0.25s ease 0s; overflow: visible; }

onclick() java 是:

<script>function toggleSocial() {
    var noShow = document.getElementById("social-noshow");
    noShow.classList.toggle("social-show"); }</script>

据我所知,按钮正在 facebook 按钮本身的跨度宽度内裁剪,即 71px。如果我增加跨度宽度,我可以看到更多的评论框。

有谁知道是什么原因造成的?

我还测试了在网站上的其他地方加载 facebook 按钮,我遇到了完全相同的问题。

4

1 回答 1

0

好的,想通了。我在我的 CSS 中进一步对 Iframe 进行了“修复”,使它们具有 100% 的跨度。删除它解决了我的问题。

于 2013-05-29T10:13:59.850 回答