css - IE11 stretches border-image -
i'm trying css3 image-border work across modern browsers , find ie11 stretches 1px-wide image slices when should solid.
here test image: http://i.imgur.com/bwwyjos.png - note how centre region (1px wide) solid white.
my css:
div { border-style: solid; border-width: 11px 24px 10px 25px; border-image-source: url(...); border-image-slice: 11 24 10 25 fill; border-image-width: 11px 24px 10px 25px; border-image-outset: 0s; border-image-repeat: stretch; }
the image's regions (in 50x50 image):
top-left: 0, 0 25,10 (25x11) top-span: 25, 0 25,10 ( 1x11) top-right: 26, 0 49,10 (24x11) left-span: 0,11 24,39 (25x29) centre: 25,11 25,39 ( 1x29) right-span: 26,11 49,39 (24x29) bottom-left: 0,40 24,49 (25x10) bottom-span: 25,40 25,49 ( 1x10) bottom-right: 26,40 49,49 (24x10)
here jsfiddle: http://jsfiddle.net/rdgbotke/
rendering comparison:
chrome 44:
ie11:
update noticed edge on windows 10 renders identically chrome, suppose must bug in ie11 then.
if matter of colors or simple graphic can drawn them, background
, background-repeat
, background-position
, background-size
alternative.
div { padding:12px 25px; background: linear-gradient(to bottom, #ff0000, #ff0000 ) 0 0 no-repeat, linear-gradient(to top , #b335b2, #b335b2) 0 bottom no-repeat, linear-gradient(to top, #00ffd8, #00ffd8) 0 0 no-repeat , linear-gradient(to top, #cfbff3,#cfbff3) top right no-repeat, linear-gradient(to top, #f6d830,#f6d830) bottom right no-repeat, linear-gradient(to top, #5c35b3,#5c35b3) top right no-repeat, linear-gradient(to top,#0000ff,#0000ff) top no-repeat, linear-gradient(to top,#00ff42,#00ff42) bottom no-repeat; background-size: 24px 11px, 24px 11px, 24px 100%, 24px 11px, 24px 11px, 24px 100%, 100% 10px, 100% 10px; }
<div> <p>blargh</p> </div>
box-shadow can :
div { margin: 20px 24px; padding:1px; box-shadow: 0 -11px #0000ff, 0 11px #00ff42, 24px 0 #5c35b3, -24px 0 #00ffd8, -24px -11px #ff0000, -24px 11px #b335b2, 24px 11px #f6d830, 24px -11px #cfbff3 }
<div> <p>blargh</p> </div>
Comments
Post a Comment