2016-10-20 25 views
6

Arkadaşımın web sitesinde çalışıyor ve SVG'nin Firefox'ta nasıl görüntüleneceğini anlayamıyorum. Edge'de tarayıcıyı yeniden boyutlandırırken de kayboluyor.Firefox'ta SVG arka planı

header::after { 
    content:""; 
    display: block; 
    background: url(/svg-filer/header-background.svg); 
    background-size: contain; 
    background-repeat: no-repeat; 
    top: 0; 
    left:-1%; 
    width: 102% !important; 
    height: 90px !important; 
    position: absolute; 
    z-index: -1; 

    -ms-transition: top ease .5s; 
    -moz-transition: top ease .5s; 
    -webkit-transition: top ease .5s; 
    transition: top ease .5s; 
} 

header.sticky-active::after { 
    top: -20px; 
} 

SVG Dosya:

<?xml version="1.0" encoding="utf-8"?> 
    <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 
    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 
     width="100%" height="90px" viewBox="0 0 1920 90" preserveAspectRatio="none">  
    <polygon id="XMLID_3_" fill="#FFFF00" points="1,99.7 1399.2,130 1921,99.7 1921,0 1,0 "/> 
    </svg> 
+0

ne demek "SVG'nin doğru görüntülenmesi" ile? Bir ekran görüntüsü ve istenen sonucun ayrıntılı bir açıklaması dahil olmak, sorununuzu görselleştirmenize yardımcı olacaktır. – Terry

+0

Anladım, cevabım aşağıda. - Teşekkürler :) –

+0

_ "(Wordpress'den dolayı önemli kullanmalıyım)" _ - daha iyi bilmediğin anlamına mı geliyor? Örneğin özgüllük hakkında? – CBroe

cevap

1

görüntü aslında doğru, beyaz -

http://lene.isreborn.com/ 

CSS (Bu Wordpress çünkü ben önemli kullanmak zorunda)? background-boyutu 'içeren' ile çalışmıyor ama: Ben şu anda var

<polygon id="XMLID_3_" fill="#000" points="1,99.7 1399.2,130 1921,99.7 1921,0 1,0 "/> 

https://jsfiddle.net/fbwsh1pf/

+0

Sadece nerede olduğunu görmek için sarıydı ... Ama evet, gerçek renk beyazdır. :) –

2

: Eğer # 000 dolgu-rengini değiştirmek varsa, bir resmi görür % 100,% 100, ile geliştirici sitesine Mozilla Background rules
Linki bakınız: See here

header::after { 
    content:""; 
    display: block; 
    background: url(/svg-filer/header-background.svg); 
    background-size: 100% 100% !important; 
    background-repeat: no-repeat; 
    top: 0; 
    left:-1%; 
    width: 102% !important; 
    height: 90px !important; 
    position: absolute; 
    z-index: -1; 

    -ms-transition: top ease .5s; 
    -moz-transition: top ease .5s; 
    -webkit-transition: top ease .5s; 
    transition: top ease .5s; 
} 

header.sticky-active::after { 
    top: -20px; 
} 
İlgili konular