简体   繁体   English

IE不会将背景图片显示为边框

[英]IE wont show background image as border

http://dhrumin.com/uploads/index.html http://dhrumin.com/uploads/index.html

Link above is my page I have been working on. 上面的链接是我一直在努力的页面。 I am using border top bottom as a background image. 我正在使用边框的顶部底部作为背景图像。 It looks great on Chrome and FF. 在Chrome和FF上看起来很棒。 But on IE it will just show one solid color background image wont show up. 但是在IE上它只会显示一个纯色背景图像,而不会显示。

Can someone help me with what I am missing out? 有人可以帮我解决我所缺少的吗?

Thanks! 谢谢!

IE doesn't support the border-image property as you can see here . IE不支持border-image属性,如您在此处所见。 A workaround would be to create two divs, above and under and give them the desired background-image : 一种解决方法是在上方和下方创建两个div并为其提供所需的background-image

HTML : HTML:

<div class="myborder"></div>
<ul id="blockquote">
    <li>Completely formulate parallel customer service rather than B2C initiatives.</li>
    <li>Compellingly target efficient experiences whereas seamless partnerships.</li> 
    <li> Seamlessly transition customer directed applications whereas intuitive.</li> 
    <li> Holisticly mesh team building "outside the box" thinking.</li>
</ul>
<div class="myborder"></div>

CSS : CSS:

.myborder {
    width: 600px;
    height: 13px;
    background: url('quote-border.png') repeat-x;
}

Don't accept this has the answer, i just moved content from 'comments'. 不接受这个问题的答案,我只是从“评论”中删除了内容。

border-image is not supported in any version of IE currently - caniuse.com/#search=border-imageNick 当前在任何版本的IE中都不支持border-image-caniuse.com/#search=border-imageNick

Indeed, you will have to split your html to make a top and a bottom div with background-image – Brewal 确实,您将必须拆分html以使背景图像成为顶部和底部div – Brewal

@Brewal, those are answers IMHO. @Brewal,这些是恕我直言的答案。 aldux aldux


From my own, i would use :before and :after to create what you want. 就我自己而言,我将使用:before和:after来创建您想要的东西。

You want something better ? 您想要更好的东西吗?

 <div class="container with THE-texture and padding"> <div>Your content</div> </div> 

This way, the outter container would act like an image background-border. 这样,外部容器将充当图像背景边框。 Here is a working example . 这是一个工作示例

it is to be IDENTICAL in visual result than what you wish. 在视觉效果上要比您期望的要相同。 In html, you added 1 extra container. 在html中,您添加了1个额外的容器。 That's a difference. 那是不同的。

Oh, let me guess, there are 'simili' borders on the sides ? 哦,让我猜猜,侧面有“ simili”边界? --> remove side's padding : http://jsfiddle.net/8puJf/1/ ->删除边的填充: http : //jsfiddle.net/8puJf/1/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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