1

我正在尝试使用border-image为图像创建自定义边框,但需要插入边框而不是图像外部。

这是我现在拥有的:https ://jsfiddle.net/kq69nxvn/

HTML: <p><img class="customBorder" src="http://lorempixel.com/640/480/" /></p>

CSS: img.customBorder {
  border-style: solid;
border-width: 5em;
-moz-border-image: url(http://despeaux.consulting/larryhooke/wp-content/uploads/sites/14/2017/02/imageBorder-draft1-black.png) 30 stretch;
-webkit-border-image: url(http://despeaux.consulting/larryhooke/wp-content/uploads/sites/14/2017/02/imageBorder-draft1-black.png) 30 stretch;
-o-border-image: url(http://despeaux.consulting/larryhooke/wp-content/uploads/sites/14/2017/02/imageBorder-draft1-black.png) 30 stretch;
border-image: url(http://despeaux.consulting/larryhooke/wp-content/uploads/sites/14/2017/02/imageBorder-draft1-black.png) 72 stretch;
}

提前致谢!

4

0 回答 0