"map"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/mirichan/pen/jEBmyG?depth=everything&limit=all&order=popularity&page=76&q=image&show_forks=false" /> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css'> <style class="cp-pen-styles">html { background: #1a1a1a; color: #e5e5e5; text-align: center; font-family: "Roboto", Helvetica, sans-serif; } body { max-width: 1200px; margin: 20px auto; padding: 0 100px; overflow-x: hidden; } .description { max-width: 600px; margin: 0 auto; color: rgba(229, 229, 229, 0.7); } div, img, footer { position: relative; box-sizing: border-box; } h1, h2, h3, h4, h5, h6 { margin-bottom: 20px; text-transform: uppercase; font-family: "Roboto Condensed", Helvetica, sans-serif; font-weight: 300; } h1 { font-size: 36pt; } h2 { font-size: 24pt; } h3 { font-size: 18pt; } h4 { font-size: 16pt; } h5 { font-size: 14pt; } h6 { font-size: 12pt; } p { font-size: 12pt; margin-bottom: 12pt; } strong { font-weight: 900; font-family: "Roboto Condensed", Helvetica, sans-serif; color: #e5e5e5; } a { -webkit-transition: color 0.25s ease-in-out; transition: color 0.25s ease-in-out; font-family: "Roboto Condensed", Helvetica, sans-serif; text-transform: uppercase; text-decoration: none; color: #dff3fd; } a:visited { color: #dff3fd; } li.active a, a:hover, a:active { color: #e5e5e5; } .centered { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .centered-y { position: absolute; width: 100%; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } .distribution-map { position: relative; width: 100%; padding: 20px; box-sizing: border-box; margin: 0 auto; } .distribution-map > img { width: 100%; position: relative; margin: 0; padding: 0; } .distribution-map .map-point { cursor: pointer; outline: none; z-index: 0; position: absolute; width: 40px; height: 40px; border-radius: 20px; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); opacity: 0.8; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -moz-transition: opacity 0.25s ease-in-out 0.25s, width 0.25s ease-in-out 0.25s, height 0.25s ease-in-out 0.25s, z-index 0.25s ease-in-out 0.25s; -o-transition: opacity 0.25s ease-in-out 0.25s, width 0.25s ease-in-out 0.25s, height 0.25s ease-in-out 0.25s, z-index 0.25s ease-in-out 0.25s; -webkit-transition: opacity 0.25s ease-in-out, width 0.25s ease-in-out, height 0.25s ease-in-out, z-index 0.25s ease-in-out; -webkit-transition-delay: 0.25s, 0.25s, 0.25s, 0.25s; -webkit-transition: opacity 0.25s ease-in-out 0.25s, width 0.25s ease-in-out 0.25s, height 0.25s ease-in-out 0.25s, z-index 0.25s ease-in-out 0.25s; transition: opacity 0.25s ease-in-out 0.25s, width 0.25s ease-in-out 0.25s, height 0.25s ease-in-out 0.25s, z-index 0.25s ease-in-out 0.25s; background: rgba(26, 26, 26, 0.85); border: 5px solid #7fcff7; } .distribution-map .map-point .content { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); opacity: 0; -webkit-transition: opacity 0.25s ease-in-out; transition: opacity 0.25s ease-in-out; width: 100%; height: 100%; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); overflow: overlay; } .distribution-map .map-point:active, .distribution-map .map-point:focus { margin: 0; padding: 0; filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false); opacity: 1; width: 300px; height: 220px; color: #e5e5e5; z-index: 1; -webkit-transition: opacity 0.25s ease-in-out, width 0.25s ease-in-out, height 0.25s ease-in-out; transition: opacity 0.25s ease-in-out, width 0.25s ease-in-out, height 0.25s ease-in-out; } .distribution-map .map-point:active .content, .distribution-map .map-point:focus .content { filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false); opacity: 1; -moz-transition: opacity 0.25s ease-in-out 0.25s, height 0.25s ease-in-out, overflow 0.25s ease-in-out; -o-transition: opacity 0.25s ease-in-out 0.25s, height 0.25s ease-in-out, overflow 0.25s ease-in-out; -webkit-transition: opacity 0.25s ease-in-out, height 0.25s ease-in-out, overflow 0.25s ease-in-out; -webkit-transition-delay: 0.25s, 0s, 0s; -webkit-transition: opacity 0.25s ease-in-out 0.25s, height 0.25s ease-in-out, overflow 0.25s ease-in-out; transition: opacity 0.25s ease-in-out 0.25s, height 0.25s ease-in-out, overflow 0.25s ease-in-out; overflow: hidden; } .distribution-map .map-point:active .content a:hover, .distribution-map .map-point:active .content a:active, .distribution-map .map-point:focus .content a:hover, .distribution-map .map-point:focus .content a:active { color: #afe1fa; } </style></head><body> <link href='//fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Roboto:100,300,400,700,900' rel='stylesheet' type='text/css'> <h1>Pure CSS Interactive Map</h1> <p class="description">This doesn’t look great at small sizes — in the original, I have an alternate rule for displaying on mobile devices. <strong>Click the points to expand them.</strong></p> <div class="distribution-map"> <!-- This was broken for a while because imgur :( --> <!-- I don't trust this host. Image here if it goes down: https://i.imgur.com/M7aUkuS.png --> <img src="https://s24.postimg.org/jnd9wc0n9/M7a_Uku_S.png"> <!--In the original application, these points are injected with Javascript, but ideally, they'd be injected with a haml loop. Because I'm hardcoding content, I'm presenting this as prerendered HTML--> <button class="map-point" style="top:15%;left:35%"> <div class="content"> <div class="centered-y"> <h2>A Place</h2> <p>You can put plenty of details in here. In the original, I listed contact information and linked phone numbers and email addresses.</p> </div> </div> </button> <button class="map-point" style="top:35%;left:50%"> <div class="content"> <div class="centered-y"> <h2>Another Place</h2> <p>Lorem ipsum something something</p> </div> </div> </button> <button class="map-point" style="top:76%;left:82.5%"> <div class="content"> <div class="centered-y"> <h2>Marauder Town</h2> <p>I solemnly swear that I am up to no good</p> </div> </div> </button> <button class="map-point" style="top:45%;left:16%"> <div class="content"> <div class="centered-y"> <h2>Logan's Mum</h2> <p>I’m a marshmallow</p> </div> </div> </button> <button class="map-point" style="top:60%;left:53%"> <div class="content"> <div class="centered-y"> <h2>Toto</h2> <p>I bless the rains</p> </div> </div> </button> <button class="map-point" style="top:25%;left:70%"> <div class="content"> <div class="centered-y"> <h2>With Love</h2> <p>— 007</p> </div> </div> </button> </div> <p class="description">It’s been brought to my attention that OSX/Safari doesn’t support :active for buttons with default settings, so you guys will have to resort to JS or hold down your mouse button to keep :focus triggered.</p> <script src='//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js'></script> </body></html>

Related: See More


Questions / Comments: