2

使用border-imageCSS 属性时,边框位于div. 有什么办法可以将边框图像放入其中div

border-width: 50px;
border-image: url(Border.png) 50 repeat;
4

1 回答 1

1

代码笔链接

你是这个意思吗?

HTML

<div>
 <span>

 </span>
</div>

CSS

div {
  border: 1px solid black;
  width: 200px;
  height: 200px;
}

span {
  box-sizing: border-box;
  display: block;
  width: 200px;
  height: 200px;
  border-width: 50px;
  border-image: url(https://www.castlejackpot.com/wp-content/uploads/dynamik-gen/theme/images/home-horizontal-border.png) 50 repeat;
}
于 2015-02-28T18:20:46.490 回答