Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <section>
  <p>Nerdeyim Ben, Şu Anda Bulunduğum Yer Neresi, Konumum Nedir, Haritada Şu Anda Nerdeyim öğrenmek istiyorum diyorsanız doğru adrestesiniz. Aşağıdaki konumunuzu gösteren yer haritasında güncel navigasyon konumunuzu görebilir ve bunu isterseniz paylaşabilirsiniz. Konum bulma servisinin çalışabilmesi için mobil cihazlarda konum paylaşım özelliğini açmanız ve bilgisayarınızda tarayıcınız için konum paylaşımına izin vermelisiniz.</p>
  <button class="open-model">Modal aç</button>
  <output aria-live="polite"></output>
</section>
<dialog id="location-modal">
  <svg id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">
	.st0{fill:#EEEDF2;}
	.st1{fill:#D3D5E7;}
	.st2{fill:#FFFFFF;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st3{fill:#DA867D;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st4{fill:none;stroke:#1E247E;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}
	.st5{fill:none;stroke:#1E247E;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:10;}
	.st6{fill:#F0C330;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st7{fill:none;stroke:#1E247E;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}
	.st8{fill:#DBE7FE;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st9{fill:none;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st10{fill:#1E247E;stroke:#1E247E;stroke-width:4;stroke-linecap:round;stroke-miterlimit:10;}
	.st11{fill:none;stroke:#FFFFFF;stroke-width:7;stroke-linecap:round;stroke-miterlimit:10;}
	.st12{fill:#FFFFFF;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
	.st13{fill:#69ADF7;stroke:#1E247E;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:10;}
	.st14{fill:none;stroke:#1E247E;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
	.st15{fill:#FFFFFF;}
	.st16{fill:#F0C330;stroke:#1E247E;stroke-width:6;stroke-miterlimit:10;}
	.st17{fill:#DA867D;stroke:#1E247E;stroke-width:6;stroke-miterlimit:10;}
	.st18{fill:none;stroke:#1E247E;stroke-width:5;stroke-linecap:round;stroke-miterlimit:10;}
	.st19{fill:none;stroke:#D3D5E7;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st20{fill:none;stroke:#D2D4E6;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st21{fill:#EFC230;stroke:#D3D5E7;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st22{fill:#FFFFFF;stroke:#1E247E;stroke-width:6;stroke-miterlimit:10;}
	.st23{fill:none;stroke:#1E247E;stroke-width:4;stroke-linecap:round;stroke-miterlimit:10;}
	.st24{fill:#EFC230;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
	.st25{fill:#69AEF8;stroke:#1E247E;stroke-width:6;stroke-miterlimit:10;}
	.st26{fill:#FFFFFF;stroke:#1E247E;stroke-width:5;stroke-linecap:round;stroke-miterlimit:10;}
	.st27{fill:#1E247E;}
	.st28{fill:#F0C330;}
	.st29{fill:#DA867D;stroke:#1E247E;stroke-width:5.5;stroke-linecap:round;stroke-miterlimit:10;}
	.st30{fill:#D3D5E7;stroke:#1E247E;stroke-width:5.5;stroke-linecap:round;stroke-miterlimit:10;}
	.st31{fill:#69AEF8;}
	.st32{fill:#D3D5E7;stroke:#1E247E;stroke-width:6;stroke-linejoin:round;stroke-miterlimit:10;}
	.st33{fill:#FCF5F2;stroke:#1E247E;stroke-width:6;stroke-linejoin:round;stroke-miterlimit:10;}
	.st34{fill:#DA867D;stroke:#1E247E;stroke-width:6;stroke-linejoin:round;stroke-miterlimit:10;}
	.st35{fill:#DA867D;}
	.st36{fill:#69AEF8;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
	.st37{fill:#1E247E;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
	.st38{fill:#DBE7FE;stroke:#1E247E;stroke-width:6;stroke-linejoin:round;stroke-miterlimit:10;}
	.st39{fill:#F0C330;stroke:#1E247E;stroke-width:6;stroke-linejoin:round;stroke-miterlimit:10;}
	.st40{fill:none;stroke:#FFFFFF;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
	.st41{fill:none;stroke:#1E247E;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
</style><g><g id="Location"><circle class="st0" cx="256" cy="256" id="Background_10_" r="215.6"/><g id="Pins"><g id="Shadows"><path class="st1" d="M442.9,329.2c0,8.6-1.6,16.8-4.4,24.5c-1.6,4.4-3.6,8.7-6.1,12.7c-2.1,3.4-4,6.8-5.9,10.4       l-45.3,87.6c-4.7,9.1-17.8,9.1-22.5,0l-45.3-87.6c-1.8-3.5-3.8-7-5.9-10.4c-2.4-4-4.4-8.2-6.1-12.7c-2.8-7.8-4.4-16.1-4.4-24.9       c0-40.4,32.9-73.2,73.5-72.8C410.7,256.4,443.1,289.3,442.9,329.2z" id="Right_27_"/><path class="st1" d="M381.5,257.9c-0.1,12.9-2.4,25.3-6.5,36.8c-2.4,6.7-5.5,13-9.1,19       c-3.1,5.1-6.1,10.3-8.8,15.6L289,460.9c-7.1,13.7-26.7,13.7-33.8,0l-68.1-131.5c-2.7-5.3-5.7-10.5-8.8-15.6       c-3.6-6-6.7-12.4-9.1-19c-4.2-11.7-6.5-24.2-6.5-37.3c0-60.7,49.5-109.9,110.4-109.4C333.1,148.4,381.8,197.9,381.5,257.9z" id="Middle_29_"/><path class="st1" d="M226.8,366.5c0,6.3-1.2,12.4-3.2,18c-1.2,3.3-2.7,6.4-4.5,9.3c-1.5,2.5-3,5-4.3,7.6       l-33.4,64.5c-3.5,6.7-13.1,6.7-16.6,0l-33.4-64.5c-1.3-2.6-2.8-5.1-4.3-7.6c-1.8-2.9-3.3-6.1-4.5-9.3       c-2.1-5.7-3.2-11.9-3.2-18.3c0-29.8,24.3-53.9,54.2-53.7C203,312.8,226.9,337.1,226.8,366.5z" id="Left_27_"/></g><g id="Middle_27_"><path class="st2" d="M365.4,257.9c-0.1,12.9-2.4,25.3-6.5,36.8c-2.4,6.7-5.5,13-9.1,19       c-3.1,5.1-6.1,10.3-8.8,15.6l-68.1,131.5c-7.1,13.7-26.7,13.7-33.8,0L171,329.3c-2.7-5.3-5.7-10.5-8.8-15.6       c-3.6-6-6.7-12.4-9.1-19c-4.2-11.7-6.5-24.2-6.5-37.3c0-60.7,49.5-109.9,110.4-109.4C317,148.4,365.7,197.9,365.4,257.9z" id="Shape_45_"/><circle class="st3" cx="256" cy="264.7" id="Dot_3_" r="52"/><path class="st4" d="M304.4,176.3c8.6,3.7,16.1,9.6,21.8,17" id="Top_line_4_"/><g id="Lines_19_"><line class="st5" id="Bottom_30_" x1="232.5" x2="239.1" y1="350.6" y2="355.6"/><line class="st5" id="Middle_28_" x1="232.5" x2="245.6" y1="344.3" y2="354.4"/><line class="st5" id="Top_31_" x1="242" x2="245.6" y1="345.2" y2="348"/></g></g><g id="Left_26_"><path class="st2" d="M210.7,366.5c0,6.3-1.2,12.4-3.2,18c-1.2,3.3-2.7,6.4-4.5,9.3c-1.5,2.5-3,5-4.3,7.6       l-33.4,64.5c-3.5,6.7-13.1,6.7-16.6,0l-33.4-64.5c-1.3-2.6-2.8-5.1-4.3-7.6c-1.8-2.9-3.3-6.1-4.5-9.3       c-2.1-5.7-3.2-11.9-3.2-18.3c0-29.8,24.3-53.9,54.2-53.7C186.9,312.8,210.8,337,210.7,366.5z" id="Shape_44_"/><circle class="st6" cx="157" cy="369.8" id="Dot_1_" r="25.5"/><path class="st4" d="M177.1,329.5c4.3,1.9,8.1,4.8,10.9,8.5" id="Top_line_3_"/><g id="Lines_18_"><line class="st7" id="Bottom_29_" x1="147.2" x2="152.5" y1="417.9" y2="421.9"/><line class="st7" id="Middle_26_" x1="147.2" x2="157.7" y1="412.9" y2="420.9"/><line class="st7" id="Top_30_" x1="154.8" x2="157.7" y1="413.6" y2="415.8"/></g></g><g id="Right_26_"><path class="st2" d="M426.8,329.2c0,8.6-1.6,16.8-4.4,24.5c-1.6,4.4-3.6,8.7-6.1,12.7c-2.1,3.4-4,6.8-5.9,10.4       l-45.3,87.6c-4.7,9.1-17.8,9.1-22.5,0l-45.3-87.6c-1.8-3.5-3.8-7-5.9-10.4c-2.4-4-4.4-8.2-6.1-12.7c-2.8-7.8-4.4-16.1-4.4-24.9       c0-40.4,32.9-73.2,73.5-72.8C394.6,256.3,427,289.2,426.8,329.2z" id="Shape_43_"/><circle class="st8" cx="354" cy="333.7" id="Dot_2_" r="34.6"/><path class="st4" d="M382.4,274.8c6.3,3.2,11.8,7.5,16.4,12.7" id="Top_line_2_"/><g id="Lines_17_"><line class="st5" id="Bottom_28_" x1="345.3" x2="351.9" y1="404.8" y2="409.8"/><line class="st5" id="Middle_25_" x1="345.3" x2="358.4" y1="398.5" y2="408.5"/><line class="st5" id="Top_29_" x1="354.8" x2="358.4" y1="399.3" y2="402.1"/></g></g></g><g id="Bottom_line_8_"><line class="st9" id="_x34_th_5_" x1="440.8" x2="471.6" y1="471.1" y2="471.1"/><line class="st9" id="_x33_rd_8_" x1="316.6" x2="426.8" y1="471.1" y2="471.1"/><line class="st9" id="_x32_nd_9_" x1="116.8" x2="295.8" y1="471.1" y2="471.1"/><line class="st9" id="_x31_st_9_" x1="42.8" x2="103.3" y1="471.1" y2="471.1"/></g><g id="Arrows_2_"><path class="st10" d="M91.5,307.2l-5.5-7.6l-8.1-4.1c-0.2-0.1-0.2-0.4,0-0.5l15-5.6c0.2-0.1,0.4,0.1,0.3,0.3      l-1.3,17.3C91.9,307.3,91.6,307.4,91.5,307.2z" id="Bottom_27_"/><path class="st10" d="M117,273.5l-5.5-7.6l-8.1-4.1c-0.2-0.1-0.2-0.4,0-0.5l15-5.6c0.2-0.1,0.4,0.1,0.3,0.3      l-1.3,17.3C117.4,273.6,117.1,273.7,117,273.5z" id="Top_28_"/></g><g id="Sparkles_5_"><line class="st11" id="Bottom_26_" x1="343.4" x2="335.2" y1="130.8" y2="133.7"/><line class="st11" id="Middle_24_" x1="333.6" x2="327.4" y1="119.3" y2="126.9"/><line class="st11" id="Top_27_" x1="318.4" x2="319.3" y1="121.4" y2="112.2"/></g></g></g></svg>
  <h3>Konum bilginizi almak için izin istiyoruz</h3>
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi harum nam dolor? Quisquam expedita inventore repellendus cum veritatis! Voluptatibus, adipisci?</p>
  <div class="actions">
    <button>Tamam</button>
    <button class="close-modal ghost-button">Kapat</button>
  </div>
</dialog>
              
            
!

CSS

              
                :root {
  --text-color: rgb(107, 114, 128);
  --title-color: rgb(55, 65, 81);
  --button-bg-color: rgb(0, 102, 254);
  --button-color: rgb(255, 255, 255);
  --backdrop-color: rgba(238, 241, 247, .5);
}

@import url('https://fonts.googleapis.com/css2?family=Viaoda+Libre&display=swap');

body{
  font-family: 'Lato', sans-serif;
  background-color: #fafafa;
  line-height: 1.5;
  font-size: 16px;
  color: var(--text-color);
}

section {
  width: 80ch;
  margin: 0 auto;
}

button {
  background-color: var(--button-bg-color);
  border: 0;
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
  color: var(--button-color);
  cursor: pointer;
}

dialog {
  border: 0;
  border-radius: 30px;
  padding: 20px;
  width: 400px;
  color: var(--text-color);
}

dialog svg {
  width: 150px;
  margin: 0 auto;
}

dialog[open] {
  display: flex;
  flex-direction: column;
  animation: lastik .15s cubic-bezier(0, 1.8, 1, 1.8);
}


dialog::backdrop {
  background: rgba(0,0,0, .5);
}

dialog h3 {
  margin-bottom: 0;
  color: var(--title-color);
}

dialog .actions {
  display: flex;
  gap: 10px;
}

dialog .actions button {
  width: 100%;
}

.ghost-button {
  color: var(--button-bg-color);
  background-color: var(--button-color);
  border: 1px solid var(--button-bg-color);
}

@keyframes lastik {
  from {
    opacity: 0;
    transform: translateX(-3rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}
              
            
!

JS

              
                const openModal = document.querySelector('.open-model');
const closeModal = document.querySelector('.close-modal');
const locationModal = document.getElementById('location-modal');
var outputBox = document.querySelector('output');

openModal.addEventListener('click', () => {
  locationModal.showModal();
});

closeModal.addEventListener('click', () => {
  locationModal.close();
  outputBox.value = locationModal.returnValue + " modal kapandı - " + (new Date()).toString();
});

locationModal.addEventListener("click", event => {
    const rect = locationModal.getBoundingClientRect();
    if (event.clientY < rect.top || event.clientY > rect.bottom ||
        event.clientX < rect.left || event.clientX > rect.right) {
        locationModal.close();
    };
});
              
            
!
999px

Console