【发布时间】:2015-09-24 13:27:36
【问题描述】:
我按照这个答案创建了一个带有背景图像的八边形:
How can I create Octagonal mask in CSS
如何在它周围添加边框?
.octa {
height: 100%;
overflow: hidden;
position: absolute;
@include rotate(45deg);
width: 100%;
}
.octa:after {
background-image: url('http://lorempixel.com/400/400/nature');
background-position: center center;
background-size: auto 100vh;
bottom: 0;
content: '';
left: 0;
position: absolute;
right: 0;
top: 0;
@include rotate(45deg);
}
提前致谢
【问题讨论】:
-
这不是你所需要的,但这里使用的方法可以给你一些关于如何添加边框的想法 - stackoverflow.com/questions/29881210/…
标签: css css-shapes