2013-03-20 76 views
0

我有一个奇怪的问题与饼图和iE8馅饼正确地将border-radius属性应用于元素,但元素的背景(渐变或平面颜色)溢出边框,看起来像它在顶部,隐藏了实际元素。按钮和馅饼的Css

我一直在使用Pie CSS一段时间。我知道,在PHP环境中使用它时,pie.php是必需的,并且Pie的正确位置位于该网站的根目录。我从来没有这个问题,但现在我使用响应式框架我有这个问题。我们用这种结构制成的按钮:

<p class="btn"> 
    <a href="#">Learn More</a> 
</p> 

CSS:

.btn { 

    position: relative; 
    display: inline-block; 
    width: auto; 
    height: 36px; 
    font-size: 16px; 
    line-height: 36px !important; 
    border: 1px solid #a0c401; 
    border-radius: 4px; 
    cursor: pointer; 
    margin: 0 0 20px 0; 
    -webkit-box-shadow: inset 0 1px 1px #fff, 
     0 1px 2px rgba(0,0,0,0.31); /* Remove this line if you dont want a dropshadow on your buttons*/ 
    box-shadow: inset 0 1px 1px #fff, 
       0 1px 2px rgba(0,0,0,0.31); /* Remove this line if you dont want a dropshadow on your buttons*/ 
    background: #c0eb03; /* Old browsers */ 
    background: -moz-linear-gradient(top, #c0eb03 0%, #a8cd01 100%); /* FF3.6+ */ 
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#c0eb03), color-stop(100%,#a8cd01)); /* Chrome,Safari4+ */ 
    background: -webkit-linear-gradient(top, #c0eb03 0%,#a8cd01 100%); /* Chrome10+,Safari5.1+ */ 
    background: -o-linear-gradient(top, #c0eb03 0%,#a8cd01 100%); /* Opera 11.10+ */ 
    background: -ms-linear-gradient(top, #c0eb03 0%,#a8cd01 100%); /* IE10+ */ 
    background: linear-gradient(top, #c0eb03 0%,#a8cd01 100%); /* W3C */ 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#c0eb03', endColorstr='#a8cd01',GradientType=0); /* IE6-9 */ 
    -pie-background: linear-gradient(top, #c0eb03 0%,#a8cd01 100%); 
    behavior: url("PIE.php"); 
    z-index: 10 !important; 
} 
.btn a, .btn:hover a { 
    display: block; 
    text-shadow: 0px 1px 1px rgba(199, 243, 6, 1); 
    text-transform: uppercase; 
    font-family: 'AvantGardeGothicITCW01D 731075'; 
    padding: 0 20px; 
    text-align: center; 
    text-decoration: none; 
    color: #6a8100; 
    text-shadow: 0px 1px 1px rgba(199, 243, 6, 1); 
} 
+1

CSS是什么样子? – Kevin 2013-03-20 21:45:16

+0

谢谢你看这个凯文我刚刚添加CSS的问题。 – 2013-03-20 22:12:06

回答

0

它那四溢的过滤器;如果您让PIE通过-pie-background呈现渐变,则不需要。删除过滤器,一切都应该很好。

+0

你说得对,这是正确的答案,非常感谢。 – 2013-03-28 05:51:40