cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <svg version="1.1" width="0" height="0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <clipPath id="cut_circle" clipPathUnits="objectBoundingBox">
    <circle cx=".5" cy=".5" r=".47" />
</clipPath>
  </defs>
</svg>
<h1>CSS Shapes - Google Map in Text (with feature detection)</h1>
<div class="embed-container">
  <div id="map"></div>
</div>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam aliquid itaque voluptatibus optio quisquam iste minus, quo repellendus rerum, dolores libero voluptas laudantium minima, sit accusantium sapiente temporibus, cupiditate harum. 
  </p>
            
          
!
            
              body {
  margin: 0 10%;
}

.no-shapes h1:after {
  content: "Sorry, your browser doesn’t support CSS Shapes";
  color: red;
  display: block;
  font-size: 0.5em;
  margin-top: 1em;
}

.embed-container {
  width: 50%;
  height: 0;
  padding-top: 50%;
  border: .5em solid #afdad6;
  margin: 0 2em 1em 0;
  position: relative;
  float: left;
}


#map {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;

}
/* hides zoom widget and satellite toggle*/
#map .gmnoprint { display: none; }


@supports (shape-outside: border-box) {
  
  .embed-container {
    border-radius: 50%;
    shape-outside: circle(50%);
    shape-outside: margin-box;
    margin-top: 1em;
  }
  
  #map {
    
    -webkit-clip-path: circle(47%);
    clip-path: url(#cut_circle);
    clip-path: circle(50%, 50%, 47%);
    //clip-path: border-box;
  }
  
}
            
          
!
            
              # based on styled map example at
# http://goo.gl/sNJiKt

# create an array of styles
styles = [
    stylers: [
        hue: '#00ffe6'
      ,
        saturation: -20
    ]
  ,
    featureType: 'road'
    elementType: 'geometry'
    stylers: [
        lightness: 100
      ,
        visibility: 'simplified'
    ]
  ,
    featureType: 'road'
    elementType: 'labels'
    stylers: [ visibility: 'off' ]
]

# create a new StyledMapType object, passing it the array of styles,
# as well as the name to be displayed on the map type control
styledMap = new google.maps.StyledMapType(styles,
  name: 'Styled Map'
)

# create a map object, and include the
# MapTypeId to add to the map type control
mapOptions =
  zoom: 12
  center: new google.maps.LatLng(52.52, 13.42)
  mapTypeControlOptions:
    mapTypeIds: [
      google.maps.MapTypeId.ROADMAP
      'map_style'
    ]

map = new google.maps.Map(document.getElementById('map'), mapOptions)

# associate the styled map with the MapTypeId and set it to display
map.mapTypes.set 'map_style', styledMap
map.setMapTypeId 'map_style'

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console