<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
如果我给图像添加了边框,但我想要这个边框的边缘,我该怎么办?像这样:
最佳答案
使用CSS box-shadow
实现多边框。 ,
分隔列表值用于分隔多个边框/阴影。 15px
和 30px
是为每个边框/阴影的 spread-radius
表示的值。
.image {
background: url('http://placehold.it/300x300');
width: 300px;
height: 300px;
margin: 50px;
box-shadow: 0 0 0 15px #3F48CC, 0 0 0 30px #00A2E8;
}
<div class="image"></div>
关于html - 如何使用 "border"添加到图像边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32508894/