鍍金池/ 問答/HTML/ css怎樣生成反方向圓角

css怎樣生成反方向圓角

下面這個效果(這個小口)怎么生成?

clipboard.png

回答
編輯回答
默念

<div style="width:300px; height:300px; position:relative; background-color:#000">
<div style="width:30px; height:30px; border-radius:50%; position:absolute; top:-15px; right:-15px; background-color:#fff"></div>
</div>
用一個背景顏色的圓定位。

2018年6月30日 21:00
編輯回答
嘟尛嘴

after一個div 高寬一樣 border-radius:50% background-color設置成那個灰色北京 之后定為到對應位置

2017年7月19日 09:40
編輯回答
伐木累

假如那個缺口的半徑是5px;
你可以這么實現(xiàn):

.radius{
    width:10px;
    height:10px;
    border-radius:50%;
    border:1000px solid #fff;//邊框足夠大就行
    ...
}

可以試一下

2017年3月4日 08:30
編輯回答
胭脂淚

正常用css畫兩個圓,然后通過具體定位放置在相應的位置就可以了。
父級元素relative,圓absolute,然后通過top、left、right、bottom來設置具體出現(xiàn)位置。
這不是唯一辦法,選擇一種你覺得最舒服的方式就行。

2018年6月8日 20:40
編輯回答
青黛色
html:
<div class="test" >
  <div class="test1" ></div>
  <div class="test2" ></div>
</div>

css:
      .test1,.test2{
    width: 200px;
    height: 100px;
  }
  .test1{
    background: radial-gradient(circle at bottom left, transparent 15px, #b4a078 16px);
  }
  .test2{
    background: radial-gradient(circle at top left, transparent 15px, #b4a078 16px);
  }    ![圖片描述][1]

2017年9月16日 20:48