css3 border-image's transparent png issue

后端 未结 2 966
野趣味
野趣味 2021-01-15 02:36

I\'m using border-image with a PNG image that has a transparent section. The issue is that the div has background-color set the black. When I apply

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-15 02:43

    You can set background-clip to padding-box to set background color size to padding box without border:

    -moz-background-clip: padding;
    -webkit-background-clip: padding;
    background-clip: padding-box;
    

    See http://css-tricks.com/transparent-borders-with-background-clip/ for more informations.

提交回复
热议问题