0

我有这张图片的代码:

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>

边界半径 div

然后,我想根据 div 的边界半径而不是 div 来“切割”元素。我希望我已经解释了!谢谢!

4

3 回答 3

1

Just add this to your CSS for the outer or parent div that has the rounded corners.

overflow:hidden

For the google map it's not as easy.

Have a look at a few different options:

http://maps.forum.nu/temp/gm_rounded_corners.html

Is there any trick to put rounded corners on a Google map?

Transparent rounded corners on Google Map

于 2012-07-24T22:27:29.200 回答
1

设置border-radiusiframe元素。

这是jsFiddle中的一个示例

于 2012-07-24T22:41:08.843 回答
0

为所有内部元素(子元素)制作 css:

opacity:0.99;

或任何不透明度 < 1。

于 2014-11-24T20:29:12.503 回答