2013-03-20 75 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