Google Map Effect
The Effect When You Have The Same Background Color
A Pen by Saijo George on CodePen.
The Effect When You Have The Same Background Color
A Pen by Saijo George on CodePen.
<main> | |
<!-- ================== --> | |
<!-- Google Map Element --> | |
<section class="google-map"> | |
<div class="map-frame"> | |
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2148.5441034736186!2d113.90571038290093!3d22.25793180820957!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x340158f577d8e91d%3A0x771695466285a370!2sAsian%20Institute%20of%20Applied%20Buddhism%2C%20Lotus%20Pond%20Temple!5e0!3m2!1sen!2shk!4v1595793486587!5m2!1sen!2shk" width="600" height="450" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe> | |
</div> | |
</section> | |
<!-- Google Map Element --> | |
<!-- ================== --> | |
</main> |
:root { | |
/* Font Color */ | |
--light-theme: #f8f9fa; | |
/* Circle Width */ | |
--circle-diameter: 300px; | |
/* Font Family */ | |
--fonts-style-x: 'neuzeit-grotesk', sans-serif; | |
--fonts-style-y: 'neuzeit-grotesk', sans-serif; | |
/* Font Weight */ | |
--light: 300; | |
--regular: 400; | |
--bold: 700; | |
--black: 900; | |
} | |
/* ------------- */ | |
/* Basic Setting */ | |
/* ------------- */ | |
html, | |
body { | |
box-sizing: border-box; | |
font-family: 'neuzeit-grotesk', sans-serif; | |
font-weight: 300; | |
font-style: normal; | |
font-size: 1em; | |
line-height: 1.5; | |
color: #ffffffee; | |
scroll-behavior: smooth; | |
} | |
*, *::before, *::after { | |
box-sizing: inherit; | |
} | |
main { | |
position: relative; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
width: 100%; | |
height: 100vh; | |
min-height: 640px; | |
background-color: var(--light-theme); | |
} | |
::selection { | |
color: #fff; | |
background-color: var(--light-theme); | |
} | |
/* ------------- */ | |
/* Content Style */ | |
/* ------------- */ | |
.google-map { | |
position: relative; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
width: var(--circle-diameter); | |
height: var(--circle-diameter); | |
overflow: hidden; | |
border-radius: var(--circle-diameter); | |
background-color: #eee; | |
transition: 5000ms; | |
cursor: grab; | |
} | |
/* | |
.google-map::after { | |
content: ""; | |
position: absolute; | |
width: var(--circle-diameter); | |
height: var(--circle-diameter); | |
border-radius: var(--circle-diameter); | |
background: radial-gradient(circle, #ffffff00 0%, #f8f9fa 50%); | |
pointer-events: none; | |
} | |
*/ | |
.google-map .map-frame { | |
width: 100vw; | |
height: 100vh; | |
background-color: var(--light-theme); | |
} | |
.google-map iframe { | |
position: relative; | |
width: 100vw; | |
height: 100vh; | |
pointer-events: visibleStroke; | |
} | |
/* ------------------ */ | |
/* Interactive Effect */ | |
/* ------------------ */ | |
.google-map:hover { | |
width: 100vw; | |
height: 100vh; | |
border-radius: 0; | |
} |