[英]IE8 background image is not showing correctly
我在為IE8創建按鈕時使用了http://css3pie.com/ ,這是我的代碼
.mybutton
{
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
background: #135496;
background: url("../img/arrow_white.png"),-webkit-gradient(linear, 0 0, 0 bottom, from(#135496), to(#12408d))no-repeat !important;
background: url("../img/arrow_white.png"),-webkit-linear-gradient(#135496,
#12408d)no-repeat !important;
background: url("../img/arrow_white.png"),-moz-linear-gradient(#135496,
#12408d)no-repeat !important;
background: url("../img/arrow_white.png"), -ms-linear-gradient(#135496, #12408d)no-repeat !important;
background: url("../img/arrow_white.png"),-o-linear-gradient(#135496,
#12408d)no-repeat !important;
background: url("../img/arrow_white.png"), linear-gradient(#135496, #12408d)no-repeat !important;
-pie-background: url("../img/arrow_white.png"), linear-gradient(#135496, #12408d)no-repeat !important;
behavior: url("../img/PIE.htc");
background-position: 50% 50%;
position: relative;
z-index: 1;
filter: none !important; }
但是,盡管我將其設置為不重復,但它會重復背景圖像。 另外,如果我刪除餅狀背景,則背景圖像不會重復,而是缺少漸變。 我在這里做錯了什么? 餅圖是否同時支持背景漸變和背景圖像?
您需要設置一個單獨的規則,以保持所有圖像的不重復值,如下所示: background-repeat:no-repeat
您不應該這樣使用:
url("../img/arrow_white.png"), linear-gradient(#135496, #12408d)no-repeat !important;
但是這樣使用:
url("../img/arrow_white.png") no-repeat, linear-gradient(#135496, #12408d) !important;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.