css - "cut"元素如何根据div的border-radius

标签 css html

我有这张图片的代码:

CSS:

section.content {
    min-height: 500px;
    width: 73%;
    float: right;
    margin-bottom:0px;
    padding: 5px;
    background: white;
    -webkit-border-top-left-radius: 100px;
    -webkit-border-bottom-right-radius: 100px;
    -moz-border-radius-topleft: 100px;
    -moz-border-radius-bottomright: 100px;
    border-top-left-radius: 100px;
    border-bottom-right-radius: 100px;
    -webkit-box-shadow: 0px 0px 18px rgba(50, 50, 50, 0.79);
    -moz-box-shadow:    0px 0px 18px rgba(50, 50, 50, 0.79);
    box-shadow:         0px 0px 18px rgba(50, 50, 50, 0.79);
}

#map {
    width: 100%;
    height: 200px;
    margin-top: 15px;
    background: #F6F6F6;
    border-radius: 4px;
}

HTML:

<section class="content" id="contentContact">
    <div id="map"></div>
    <form id="contactForm" /></form>
</section>

border-radius div

然后,我想根据 div 的 border-radius 而不是超出 div 来“切割”元素。 我希望我已经解释过了!谢谢!

最佳答案

border-radius设置为iframe元素。

这是 jsFiddle 中的示例

关于css - "cut"元素如何根据div的border-radius,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11640200/

相关文章:

html - 移动表格 CSS : Animated

html - 居中 div 中 float 动态元素的 CSS 边距问题

css - 使用 flexbox 和 svg(使用 Sandbox) react 星级评分组件

css - 在电子邮件中添加 Google 字体

javascript - 加载此标签时如何更改 svg 文本标签 X Y?

html - 我网站上AdSense图片广告下的空白问题

javascript - 在 TinyMCE 编辑器中重复图案墙纸

javascript - 有没有办法将在浏览器中创建为 blob 的文件附加到电子邮件中

html - 在 Internet Explorer 8 中使用 "margin: 0 auto;"

html - 按钮定位和下拉菜单