简体   繁体   English

IE bug:按钮图像背景

[英]IE bug: Button image background

I'm dealing with a weird bug that I don't manage to fix. 我正在处理一个我无法解决的奇怪错误。

It's a known bug and in fact I found on the Web several solutions, but unfortunately they don't work in my case! 这是一个已知的错误,事实上我在网上找到了几个解决方案,但不幸的是它们在我的情况下不起作用!

Here is a screenshot that shows how the button appears on the other browsers, instead on IE it appears completely white. 这是一个屏幕截图,显示按钮在其他浏览器上的显示方式,而不是IE显示为完全白色。

The CSS rules that I am using are the following: 我正在使用的CSS规则如下:

background:url('http://www.legrandclub.net/wp-content/uploads/2011/07/Send-Message.jpg');
width:113px;
height:25px;
border:0px;

Which additional rule should I use? 我应该使用哪个附加规则?

Thanks 谢谢

The problem coming from bp.css , line ~660: 问题来自bp.css ,行~660:

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */

That gradient is drawn on top of everything else. 该梯度是在其他一切之上绘制的。 The rest of your button is hiding beneath it. 按钮的其余部分隐藏在它下面。

Now that you know what the problem is, you should be able to solve it. 既然您知道问题所在,那么您应该能够解决它。 You need filter: none on #send_reply_button , or you need to otherwise override/remove the filter . 您需要在#send_reply_button#send_reply_button filter: none ,否则您需要覆盖/删除filter

Perhaps just build a button in css too... 也许只是在css中构建一个按钮......

 <a href="send.htm" class="abutton">Send Message</a>

 a.dbutton {
    font-family: Verdana; font-size: 13pt; font-weight: bold;
    position: relative;
    background-color: #e60000; 
    margin-top: 3px;
    margin-bottom: 3px;
    margin-left: 21%;
    margin-right: 21%;
    text-decoration:none;
    display:block;
    padding:8px;
    border:1px solid #000;
    text-align:center;
    -moz-border-radius:5px;
    -webkit-border-radius:5px;
    -o-border-radius:5px;
    border-radius:5px;
}

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

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