html - 如何制作内边框半径?

标签 html css

<分区>

如何通过 HTML 和 CSS 内圆 Angular 边框制作这个形状?

enter image description here

最佳答案

试试这个

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/

关于html - 如何制作内边框半径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39062692/

上一篇:html - 顶部导航文本菜单无法正确垂直对齐

下一篇:html - 防止 CSS 引用在移动设备上换行

相关文章:

javascript - 如何在 HTML5 网站中创建二维码阅读器?

javascript - 调整内容大小时调整饼图大小

html - 图像太大且未正确定位在全宽 slider Wordpress Divi 主题中

html - 如何开始使用 flex?

css - 在 CSS 中组合伪类?

python - 添加通过Python通过电子邮件发送的表格的边框

javascript - 使用js获取选择选项的onclick事件

javascript - 使元素适合它的整个父级

html - 如何从面板 Bootstrap 中取消投影效果?

javascript - 如何让我的 table 根据屏幕分辨率自动调整高度