如何制作内边界半径?

时间:2016-08-21 09:18:59

标签: html css

如何通过HTML& amp; CSS内圆角半径?

enter image description here

1 个答案:

答案 0 :(得分:-1)

试试这个

HTML:

<div class="shape"></div>

CSS:

.shape{
    background: #074b7e;
    width: 300px;
    height: 150px;
    overflow: hidden;
    position: relative;
 }

 .shape:before{
     content: '';
     width: 150px;
     height: 150px;
     background: #fff;
     position: absolute;
     top: 0;
     right: -75px;
     border-radius: 100%;
 }

示例:https://jsfiddle.net/s2oew522/