Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you want to achieve the same effect without the use of any image, here is a solution on jsfiddle <a href="http://jsfiddle.net/alxscms/3Kv99/" rel="nofollow noreferrer">http://jsfiddle.net/alxscms/3Kv99/</a>. You can also add a faded inner border if you'd like, without breaking the navigation inside the map.</p> <p><img src="https://i.stack.imgur.com/5hP4e.png" alt="Google maps with rounded corners and border"></p> <p>Here is the code for the html:</p> <pre><code>&lt;div class="wrapper"&gt; &lt;div class="map" id="map"&gt;&lt;/div&gt; &lt;i class="top"&gt;&lt;/i&gt; &lt;i class="right"&gt;&lt;/i&gt; &lt;i class="bottom"&gt;&lt;/i&gt; &lt;i class="left"&gt;&lt;/i&gt; &lt;i class="top left"&gt;&lt;/i&gt; &lt;i class="top right"&gt;&lt;/i&gt; &lt;i class="bottom left"&gt;&lt;/i&gt; &lt;i class="bottom right"&gt;&lt;/i&gt; &lt;/div&gt; </code></pre> <p>And the style (scss):</p> <pre><code>$radius: 10px; $thickness: 5px; $border-color: rgba(black, 0.15); $background-color: white; .wrapper { position: relative; width: 400px; height: 200px; overflow: hidden; margin: 50px; &amp; &gt; i { display: block; position: absolute; &amp;.top { top: 0; border-top: $thickness solid $border-color; &amp;:after { top: -$radius/2 - $thickness; border-top: $radius/2 solid $background-color; } } &amp;.right { right: 0; border-right: $thickness solid $border-color; &amp;:after { right: -$radius/2 - $thickness; border-right: $radius/2 solid $background-color; } } &amp;.bottom { bottom: 0; border-bottom: $thickness solid $border-color; &amp;:after { bottom: -$radius/2 - $thickness; border-bottom: $radius/2 solid $background-color; } } &amp;.left { left: 0; border-left: $thickness solid $border-color; &amp;:after { left: -$radius/2 - $thickness; border-left: $radius/2 solid $background-color; } } &amp;.top:not(.right):not(.left), &amp;.bottom:not(.right):not(.left) { height: $thickness; left: $radius+$thickness; right: $radius+$thickness; } &amp;.left:not(.top):not(.bottom), &amp;.right:not(.top):not(.bottom) { width: $thickness; top: $radius+$thickness; bottom: $radius+$thickness; } &amp;.top.right, &amp;.top.left, &amp;.bottom.right, &amp;.bottom.left { width: $radius; height: $radius; &amp;:after { content:""; position: absolute; width: 1.5*$radius; height: 1.5*$radius; } } &amp;.top.right { border-top-right-radius: $radius; &amp;:after { border-top-right-radius: 1.5*$radius; } } &amp;.top.left { border-top-left-radius: $radius; &amp;:after { border-top-left-radius: 1.5*$radius; } } &amp;.bottom.right { border-bottom-right-radius: $radius; &amp;:after { border-bottom-right-radius: 1.5*$radius; } } &amp;.bottom.left { border-bottom-left-radius: $radius; &amp;:after { border-bottom-left-radius: 1.5*$radius; } } } } #map { width: inherit; height: inherit; .gmnoprint { display: none; } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload