0

我正在使用以下 css 代码来获取 li 的背景,使其底部有一个带箭头的圆角矩形。

background-image:url("../image/menu_button_active_left.png"), url("../image/menu_button_active_bg.png"), url("../image/menu_button_active_right.png"), url("../image/menu_button_active_bottom.png"); 
background-position:center left, center center, center right, center 43px; 
background-repeat:no-repeat, repeat-x, no-repeat, no-repeat

我的问题是显示在 background_left 和 background_right 上方的图像 background_bg 阻止了显示圆角矩形。

另外我希望背景底部位于 z-index(top) (我的意思是我希望 background_bottom 在 background_bg 的底部隐藏 1px 高度,但现在 background_bg 在 z-index(top) 处隐藏 1 px background_bottom 图像的顶部)

请帮我。

-------- 重叠的解决方案:找到 --------

我试过了

background-clip:border-box, content-box, border-box, border-box;

它工作得很好。

请帮助我将 background_bottom_image 放置在所有其他背景图像之上(如 z-index)。

4

1 回答 1

1

我找到了解决我的问题的方法。

background-clip:border-box, content-box, border-box, border-box;

使用上面的背景剪辑使其成为圆角矩形

并使用堆栈排序,我将 bottom_background 作为第一个使其显示在所有其他背景图像之上

感谢大家。

于 2013-09-24T08:55:42.100 回答