【问题标题】:Inverted rounded borders css倒圆角css
【发布时间】: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>

Example photo

【问题讨论】:

标签: html css


【解决方案1】:

尝试应用此属性:

border-radius: 100%;

并访问此链接以获得更多说明:

https://codepen.io/sergejmueller/pen/fJEml

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-08-09
    • 1970-01-01
    • 1970-01-01
    • 2013-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多