Ну, вот как я заставил это работать.Я работаю с Bulma.io
<!--- CARD 1 Ready---->
<div class="column transparent ">
<div class="card-content has-text-right one border">
<figure class="image is-square ">
</figure>
<!----BUTTON ON CARD---->
<button class="button no-hover is-text" onclick="toggleModal('modal-one')">
<ion-icon class="btn has-text-white" name="copy" size="small"></ion-icon>
</button>
<!---- END BUTTON ON CARD---->
</div>
**<!----MODAL---->**
<div id="modal-one" class="modal">
<div class="modal-background one"></div>
<div class="modal-content border" onclick="toggleModal">
<div class="box has-background-white has-text-left ">
<p class=" modal-text has-text-black is-size-6-mobile">
<strong class="has-text-grey-light">
/* Fallback for old browsers */
</strong>
<br>
background: #12c2e9; </p>
<p class="modal-text has-text-black is-size-6-mobile">
<strong class="has-text-grey-light">
/* Chrome 10-25, Safari 5.1-6 */
</strong>
<br>
background: -webkit-linear-gradient(45deg, #c471ed, #12c2e9);
</p>
<p class="modal-text has-text-black is-size-6-mobile">
<strong class="has-text-grey-light">
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
</strong>
<br>
background: linear-gradient(45deg, #c471ed, #12c2e9);
</p>
<div class="footer has-text-centered is-narrow">
<!----COPY TEXT BUTTON---->
<button class="btn button one dribbble-id is-rounded is-hoverable is-centered" data-clipboard-text="
background: #12c2e9;
/* fallback for old browsers */
background: -webkit-linear-gradient(45deg, #c471ed, #12c2e9);
/* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(45deg, #c471ed, #12c2e9);
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}">
Get your code !
</button>
<!----END COPY TEXT ICON---->
</div>
</div>
</div>
<!---- CLOSE MODAL ICON---->
<button class="modal-close is-large" aria-label="close" onclick="toggleModal('modal-one')"></button>
<!----END CLOSE MODAL ICON---->
</div>
<!----END MODAL---->
</div>
Javascript для модальных
//Here we will controll the modal.
function toggleModal(modal) {
var Modal = document.querySelector(`#${modal}`);
Modal.classList.toggle('is-active');
};