为什么 CSS3 背景剪辑或背景起源不起作用?我的代码有什么问题吗?

发布于 2024-10-10 06:17:54 字数 1311 浏览 0 评论 0原文

我想使用三个图像来制作背景:alt text alt text alt text

我也想使用CSS3背景剪辑或背景- origin 属性,使用多个图像 这是我的CSS代码:

    .border
    {
        background:url("fancy_title_main.png"),url("fancy_title_left.png"),url("fancy_title_right.png");
        background-repeat:repeat-x,no-repeat,no-repeat;
        background-position:center,left,right;

        background-clip: content,border,border;
        background-origin:content,border,border;
        -moz-background-clip: content,border,border;
        -moz-background-origin: content,border,border;
        -webkit-background-clip: content,border,border;
        -webkit-background-origin:content,border,border;

        border-width:0 15px;
        border-style:solid;

        width:80px;
        height:32px;
    }

但是,它不起作用,在firefox 3.6.6上:alt text

在firebug中: alt text

在我的 css 中,我设置了 -moz-background-clip: content,border,border;< /code> 但它显示 -moz-background-clip:border, border, border;为什么?

我怎样才能制作出我想要的背景?我的 CSS 代码有什么问题?

谢谢

I want use three images to make a background:alt text alt text alt text

As well I want use CSS3 background-clip or background-origin property,to use multiple images
here is my css code:

    .border
    {
        background:url("fancy_title_main.png"),url("fancy_title_left.png"),url("fancy_title_right.png");
        background-repeat:repeat-x,no-repeat,no-repeat;
        background-position:center,left,right;

        background-clip: content,border,border;
        background-origin:content,border,border;
        -moz-background-clip: content,border,border;
        -moz-background-origin: content,border,border;
        -webkit-background-clip: content,border,border;
        -webkit-background-origin:content,border,border;

        border-width:0 15px;
        border-style:solid;

        width:80px;
        height:32px;
    }

however,it doesn't work,on firefox 3.6.6:alt text

in the firebug:alt text

In my css ,I set the -moz-background-clip: content,border,border; but it show -moz-background-clip:border, border, border;Why?

How can I make the background like I wanted?What's wrong with my CSS code?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小嗲 2024-10-17 06:17:54

您需要使用内容框、边框框和填充框。

https://developer.mozilla.org/en/CSS/background-clip

You need to be using content-box, border-box, and padding-box.

https://developer.mozilla.org/en/CSS/background-clip

情感失落者 2024-10-17 06:17:54

您可能需要 border-color:transparent (另请参阅我上面的评论)。

You might want border-color: transparent (and see also my comment above).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文