How to create smooth edges in CSS border shape?

时间:2016-08-30 04:27:22

标签: html css

Here is my screen shot, You can able see the blurred edges on the top-left side, I am new to CSS, Please provide solution for this problem.

enter image description here

.shape {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #9966ff;
  outline: 1px solid transparent;
  box-shadow: 0 0 1px rgba(255, 255, 255, 0);
}
.shape:after {
  content: '';
  border-right: 1500px solid rgba(0, 0, 0, 0);
  border-top: 250px solid rgba(255, 255, 255, 1);
  border-left: 1500px solid rgba(255, 255, 255, 1);
  float: right;
}
<div class="shape"></div>

2 个答案:

答案 0 :(得分:0)

内部形状使用样式“border-radius:15px;”

答案 1 :(得分:0)

.shape {
  position: absolute;
  width: 100%;
  /*height: 100%;*/
  top: 0;
  left: 0;
  background-color: #9966ff;
  outline: 1px solid transparent;
  box-shadow: 0 0 1px rgba(255, 255, 255, 0);
  border-radius: 56px;
}
.shape:after {
  content: '';
  border-right: 1500px solid rgba(0, 0, 0, 0);
  border-top: 340px solid rgba(255, 255, 255, 1);
  border-left: 1500px solid rgba(255, 255, 255, 1);
  float: right;
}
<div class="shape"></div>