2

我发现的所有使用border-image的例子都是固定的x和y。有没有办法让边框图像使用百分比来补偿不同的宽度或高度?

4

2 回答 2

1

如果您正在谈论切片图像边框图像切片是您需要的属性,您可以在 percantage 中指定,请参阅http://www.w3schools.com/cssref/css3_pr_border-image.asp

于 2012-08-17T09:53:32.737 回答
0

You're not going to be able to do this with straight CSS. You're going to need some javascript to figure out how large the images are and set the borders accordingly. I've created a quick mockup on jsbin. Check it out here.

于 2012-08-16T15:19:10.490 回答