【发布时间】:2017-07-20 23:59:58
【问题描述】:
我在实现照片上的倒置边框效果方面遇到了很大的问题。我知道如果它是非透明背景会是什么样子,但无法弄清楚它何时是完全透明的。你有什么想法?谢谢你的帮助。
这是我的非透明背景代码示例:
.box {
width: 100px;
height: 120px;
margin: 0 auto;
position: relative;
background-image: radial-gradient( transparent 0px, transparent 10px, orangered 10px, orangered );
background-size: 20px 20px;
background-position: -10px -10px;
&:before, &:after {
content: '';
display: block;
position: absolute;
background-color: orangered;
}
&:before {
top: 0;
right: 10px;
bottom: 0;
left: 10px;
}
&:after {
top: 10px;
right: 0;
bottom: 10px;
left: 0;
}
}
.inner-round {
height: 100px;
width: 100px;
background: orangered;
}
<div class="box">
</div>
【问题讨论】:
-
你的html和css在哪里?
-
图片不适合我:/
-
请提供一些代码