简体   繁体   English

Internet Explorer的CSS问题

[英]Css issue with Internet Explorer

my popup box working well with other browsers except Internet Explorer. 我的弹出框可与Internet Explorer以外的其他浏览器很好地配合使用。 I couldn't find the problem. 我找不到问题。 Can someone help me please? 有人能帮助我吗?

Popup box 弹出框

The problem is at Facebook like button and Tweet button. 问题出在Facebook之类的按钮和Tweet按钮上。 Try to see it with different browser than Internet Explorer. 尝试使用不同于Internet Explorer的浏览器查看它。 Then view it in Internet Explorer. 然后在Internet Explorer中查看它。

HTML 的HTML

<div class="gallery-buttons">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
    <div class="gallery-buttons-fb">
        <iframe src="//www.facebook.com/plugins/like.php?href=http://mw2.google.com/mw-panoramio/photos/medium/3141724.jpg&amp;send=false&amp;layout=button_count&amp;width=120&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=204284306319205" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:21px;" allowTransparency="true"></iframe>
    </div>
    <div class="gallery-buttons-tw">
        <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://mw2.google.com/mw-panoramio/photos/medium/3141724.jpg" data-text="text" data-via="me" data-related="you" data-hashtags="tag">Tweet</a>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    </div>
</div>

CSS 的CSS

.gallery-comments {
}
.gallery-buttons-tw {
    float: right;
    height: 20px;
    width: 55px;
}
.gallery-buttons {
    background-color: #ECC5A6;
    border-radius: 3px 0 0 0;
    bottom: 22px;
    float: right;
    overflow: hidden;
    padding-left: 3px;
    padding-top: 1px;
    position: relative;
}
.gallery-image {
}
.gallery-top {
}
.gallery-container {
}
.gallery-wrapper {
    background-color: #E9E8E6;
    border-radius: 5px 5px 5px 5px;
    padding: 10px;
    width: 500px;
}
.gallery-buttons-fb {
    float: left;
    width: 46px;
}

Jsfiddle 杰斯菲德尔

Try to set width on the 尝试在

.gallery-buttons { }

because now ie did not know the width. 因为现在即不知道宽度。 By the way I test it and with the width I fix it. 顺便说一下,我测试它,并用宽度固定它。

Give overflow: hidden; overflow: hidden; and float: right; float: right; to the DIVs containing FB and Twitter iframes, ie the ones with classes gallery-buttons-fb and gallery-buttons-tw . 到包含FB和Twitter iframe的DIV,即具有类gallery-buttons-fbgallery-buttons-tw的DIV。

Try adding width to .gallery-buttons 尝试为.gallery-buttons添加宽度

.gallery-buttons {
    background-color: #ECC5A6;
    border-radius: 3px 0 0 0;
    bottom: 22px;
    float: right;
    overflow: hidden;
    padding-left: 3px;
    padding-top: 1px;
    position: relative;
    width: 101px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM