我正在尝试在 div 周围放置边框图像。我遵循了关于 css-tricks 的提示,但我无法让它工作。这是页面:http ://darylkeep.com/aanbod/
编辑:我在角落里得到四个小边框,而不是整个 div 周围的一个。为什么是这样?
我也想知道这是否仍然是这样做的方法,因为我以前没有遇到过这个属性。有没有更好的办法?提前致谢。
<div id="main-content">stuff</div>
.
#main-content {
margin-top: 30px; margin-bottom:30px; padding:20px 20px 20px 20px; width:80%;
background:rgba(255, 255, 255, 0.7);
border-image-source: url(www.darylkeep.com/wp-content/themes/darylkeep/assets/images/wiggly_border_full.png);
-moz-border-image-source: url(www.darylkeep.com/wp-content/themes/darylkeep/assets/images/wiggly_border_full.png);
-webkit-border-image-source: url(www.darylkeep.com/wp-content/themes/darylkeep/assets/images/wiggly_border_full.png);
-o-border-image-source: url(www.darylkeep.com/wp-content/themes/darylkeep/assets/images/wiggly_border_full.png);
-ms-border-image-source: url(www.darylkeep.com/wp-content/themes/darylkeep/assets/images/wiggly_border_full.png);
border-image-slice:2,8% 1,7% 2,8% 1,7%;
border-image-repeat: stretch;
border-image-width:100px;
border-width:50px;
border-style: solid;
}