简体   繁体   中英

border-image is not working

Firefox isn't showing CSS border-image . Other browsers (Chrome, Safari, Opera) are showing this without Problems.

I have following code:

<div id="headerwrapper">
    header here
</div><!-- headerwrapper -->

<div id="mainwrapper">
    maincontent here
</div><!-- mainwrapper -->

and this CSS:

#headerwrapper {
    border-bottom-width: 15px;
    border-image: url(images/zickzack-white.png) 15 0 repeat;
    border-image-outset: 7px;
}
#mainwrapper {
    background-color: rgba(255, 255, 255, 0.4);
    background-size: 100px 200px;
    padding: 20px 0 200px;
}

This picture shows result in Chrome (upper part) and Firefox (lower part)

Can someone please help?

try this code

border-style: solid;
border-width: 26px 26px 27px 27px;
-moz-border-image: url(http://www.w3.org/TR/css3-background/border.png) 26 26 27 27 repeat;
-webkit-border-image: url(http://www.w3.org/TR/css3-background/border.png) 26 26 27 27 repeat;
-o-border-image: url(http://www.w3.org/TR/css3-background/border.png) 26 26 27 27 repeat;
border-image: url(http://www.w3.org/TR/css3-background/border.png) 26 26 27 27 fill repeat;

Mozilla Firefox 15+ supports "border-image".

Mozilla Firefox 3.5+ supports "-moz-border-image".

You can use the following generator: http://border-image.com It might help writing the CSS code for "border-image".

You can try the following code:

#headerwrapper {    
    border-style: solid; border-width: 27px; -moz-border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 repeat; 
    -webkit-border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 repeat; 
    -o-border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 repeat; 
    border-image: url(http://www.w3.org/TR/css3-background/border.png) 27 fill repeat;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM