2013-07-28 31 views
0

我在IE中遇到问题,它没有按照我希望的那样显示。IE渐变比预期更深

我创建了一个灰色渐变按钮,当您将鼠标悬停在它上面时,它会变得稍暗。它在Firefox或Chrome中的显示方式没有问题,它似乎只是一个Internet Explorer问题。

HTML:

<input type="submit" value="Search" class="button1"> 

CSS:

.button1{ 
    height:26px; font-family:verdana,arial, helvetica, sans-serif; font-size:12px; font-weight:bold; 
    cursor:pointer; 
    padding-left:10px; padding-right:10px; margin:2px; 
    border:1px solid #000; float:left; 
    -webkit-border-radius: 5px; 
    -moz-border-radius: 5px; 
    border-radius: 5px; 
    background-color:#CCC; 
    background: rgb(254,255,232); /* Old browsers */ 
    background: -moz-linear-gradient(top, rgba(254,255,232,1) 0%, rgba(214,219,191,1) 100%); /* FF3.6+ */ 
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(254,255,232,1)), 
     color-stop(100%,rgba(214,219,191,1))); /* Chrome,Safari4+ */ 
    background: -webkit-linear-gradient(top, rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* Chrome10+,Safari5.1+ */ 
    background: -o-linear-gradient(top, rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* Opera 11.10+ */ 
    background: -ms-linear-gradient(top, rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* IE10+ */ 
    background: linear-gradient(to bottom, rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* W3C */ 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#feffe8', endColorstr='#d6dbbf',GradientType=0); /* IE6-9 */ 
} 

.button1:hover{ 
    background: -webkit-gradient(linear, left top, left bottom, from(#E6E6E6), to(#fff));/*for webkit*/ 
    background: -moz-linear-gradient(top, #E6E6E6, #fff);/*for firefox*/ 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#E6E6E6', endColorstr='#fff',GradientType=0);/*for IE*/ 
} 

的jsfiddle: http://jsfiddle.net/Wg65Y/

回答