Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html css-safari 5.x版中的边框宽度、边框背景和背景问题_Html_Css - Fatal编程技术网

Html css-safari 5.x版中的边框宽度、边框背景和背景问题

Html css-safari 5.x版中的边框宽度、边框背景和背景问题,html,css,Html,Css,我一直在尝试将背景图像添加到html文档中元素的边框: 你可以在这里看到: HTML: 以及: 这在Safari 5.x中不起作用,但在Safari 6、FF和Chrome中起作用。。。 (为什么图像的背景成为元素的背景?) 所以我有两个问题 是否有任何解决方案,如果有,什么解决方案,如果没有 如果Safari 5.x不支持边框的背景,我如何使用CSS定位此特定浏览器 谢谢 您没有像这样的o形边框图像。 -o-border-image: url(http://heroeswallpapers.c

我一直在尝试将背景图像添加到html文档中元素的边框:

你可以在这里看到: HTML:

以及:

这在Safari 5.x中不起作用,但在Safari 6、FF和Chrome中起作用。。。 (为什么图像的背景成为元素的背景?)

所以我有两个问题

  • 是否有任何解决方案,如果有,什么解决方案,如果没有

  • 如果Safari 5.x不支持边框的背景,我如何使用CSS定位此特定浏览器


  • 谢谢

    您没有像这样的o形边框图像。

    -o-border-image: url(http://heroeswallpapers.com/wp-content/uploads/2012/12/cute-twitter-background.jpg) 10 10 10 10 repeat;
    

    试着添加这个,告诉我它是否有效。

    它在safari 5.x中有效。它只需要加载时间。所以你可以在css中更早地加载它,然后直接否决它。我使用的是5.1.7,但它不起作用,我在边框中看到了背景图像是的,但背景图像不应该是元素的背景。如果你试图针对特定的浏览器,我会使用Modernizer来针对该功能。啊。我不会只为边框使用一堆js代码。对不起,你说的-o-border图像是什么意思?
    a {
        border-width:10px;
        border-color:#006;
        background-color: #CF0;
        -moz-border-image: url(http://heroeswallpapers.com/wp-content/uploads/2012/12/cute-twitter-background.jpg) 10 10 10 10 repeat;
        -webkit-border-image: url(http://heroeswallpapers.com/wp-content/uploads/2012/12/cute-twitter-background.jpg) 10 10 10 10 repeat;
        border-image: url(http://heroeswallpapers.com/wp-content/uploads/2012/12/cute-twitter-background.jpg) 10 10 10 10 repeat;
    }
    
    -o-border-image: url(http://heroeswallpapers.com/wp-content/uploads/2012/12/cute-twitter-background.jpg) 10 10 10 10 repeat;