Last active
November 17, 2020 04:10
-
-
Save okumurakengo/9e583f0ae66ebdd5668325c6c2eaa834 to your computer and use it in GitHub Desktop.
簡易モーダルを表示するスクリプト、devtoolsのコンソールにコピペしたら簡易モーダルが表示される
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.body.style.position = 'relative' | |
document.body.insertAdjacentHTML('beforeend', ` | |
<div class="user_css_container"> | |
<div class="user_css_box"> | |
<h1>簡易モーダル</1> | |
</div> | |
</div> | |
<style> | |
.user_css_container { | |
box-sizing: border-box; | |
width: 100%; | |
height: 100vh; | |
position: absolute; | |
top: 0; | |
left: 0; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
background: transparent; | |
} | |
.user_css_box { | |
background-color: lightgreen; | |
width: 300px; | |
height: 200px; | |
} | |
</style> | |
`) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment