Alex

How to create bitcoin donation box with html css javascript

0
HTML
    
    
    
        div class="plan-card">
        h2>Donate BitcoinSend only Bitcoin (BTC) to this deposit address. Sending any other coin or token to this address may result in the loss of your donation, Thanks! /span> /h2>
        div class="etiquet-price">
            img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNBMImgV8G4wldahqdCtoBBVWK_VCVkf0JWIoCZJYG318MkAKC7z0-3QijFgaR0TL4aiYpZEHC13UCkd1lyzveuzafXYxP-Ido3lGkaasOhohd_-_Wl1gRRZVxOIJy9awIN9rGJV8g4oK6dzzGl2htPVc8DDitqau5ZSZltScvdrKj2sciB9msdzySZQ/s320/payment.png" alt="">
            div> /div
        /div>
        
            h3>Thanks for the support /h3>
        
        div class="button-g">
            div class="container">
                div class="label">
                    
                /div>
                div class="copy-text">
                    input type="text" class="text" value="bc1qr7szjagh42l3fcjuj6yza9c8mgudr0wpf84t6x" />
                    button> i class="fa fa-clone"> /i> /button>
                /div>
            /div>
        /div>
    /div




script
    let copyText = document.querySelector(".copy-text");
copyText.querySelector("button").addEventListener("click", function () {
	let input = copyText.querySelector("input.text");
	input.select();
	document.execCommand("copy");
	copyText.classList.add("active");
	window.getSelection().removeAllRanges();
	setTimeout(function () {
		copyText.classList.remove("active");
	}, 2500);
});

/script 

    script src="https://kit.fontawesome.com/da9904b7b5.js" crossorigin="anonymous"> /script
    
    
    
    

       
CSS
    
    body{
display: flex;
justify-content: center;
margin-top: 140px;
}

.plan-card {
background: #ddecff;
width: 18rem;
height: 400px;
padding-left: 2rem;
padding-right: 2rem;
padding-top: 10px;
padding-bottom: 20px;
border-radius: 10px;
border-bottom: 4px solid #5997FF;
box-shadow: 0 6px 30px rgba(50, 48, 48, 0.3);
font-family: "Poppins", sans-serif;
  }
  
  .plan-card h2 {
margin-bottom: 15px;
font-size: 30px;
font-weight: 600;
margin-top: 2px;
  }
  
.plan-card h2 span {
display: block;
margin-top: -4px;
color: #4d4d4d;
font-size: 12px;
font-weight: 400;
  }
  
  .etiquet-price {
position: relative;
background: #ffb222;
width: 19rem;
height: 175px;
margin-left: -0.65rem;
padding: .2rem 1.2rem;
border-radius: 5px 0 0 5px;
  }
  
.etiquet-price img {
margin: 0;
width: 300px;
padding-top: .10rem;
display: flex;
justify-content: center;
  }

.etiquet-price p:before {
content: "";
margin-right: 5px;
font-size: 20px;
font-weight: 340px;
  }
  
.etiquet-price p:after {
content: "/ handle";
margin-left: 5px;
font-size: 20px;
font-weight: 300;
  }
  
  .etiquet-price div {
position: absolute;
bottom: -23px;
right: 0px;
width: 0;
height: 0;
border-top: 13px solid #c58102;
border-bottom: 10px solid transparent;
border-right: 13px solid transparent;
z-index: -6;
  }
  
h3{
font-size: 25px;
display: flex;
justify-content: center;
margin-top: 10px;
  }

.container {
position: absolute;
top: 500px;
left: 50%;
transform: translate(-50%, -50%);
}
.label {
padding: 10px;
font-size: 18px;
color: #111;
}

.copy-text {
position: relative;
padding: 10px;
background: #fff;
border: 1px solid #ddd;
border-radius: 10px;
display: flex;
}
.copy-text input.text {
padding: 10px;
font-size: 18px;
color: #555;
border: none;
outline: none;
}

.copy-text button {
padding: 10px;
background: #5784f5;
color: #fff;
font-size: 18px;
border: none;
outline: none;
border-radius: 10px;
cursor: pointer;
}

.copy-text button:active {
	background: #809ce2;
}
.copy-text button:before {
content: "Copied";
position: absolute;
top: -45px;
right: 0px;
background: #5c81dc;
padding: 8px 10px;
border-radius: 20px;
font-size: 15px;
display: none;
}

.copy-text button:after {
content: "";
position: absolute;
top: -20px;
right: 25px;
width: 10px;
height: 10px;
background: #5c81dc;
transform: rotate(45deg);
display: none;
}

.copy-text.active button:before,
.copy-text.active button:after {
	display: block;
}
footer {
position: fixed;
height: 50px;
width: 100%;
left: 0;
bottom: 0;
background-color: #5784f5;
color: white;
text-align: center;
}

footer p {
margin: revert;
padding: revert;
}

       

Post a Comment

0Comments
Post a Comment (0)