Full CODE
Add Css Shadow
<div class="container">
<div class="notepad">
<h1> <p contenteditable="true">My Notepad</p> </h1>
<textarea id="textArea" placeholder="Write your notes here"></textarea>
<button id="downloadBtn">Download</button>
</div>
</div>
<style>
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.notepad {
width: 400px;
background-color: #f9f9f9;
padding: 20px;
text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
h1 {
margin-top: 0;
}
textarea {
width: 100%;
height: 200px;
margin-bottom: 10px;
padding: 5px;
background: #fff;
color: #000;
border-radius: 13px 13px 13px 13px; -moz-border-radius: 13px 13px 13px 13px; border-radius: 13px 13px 13px 13px;
border: 2px dashed #1C6EA4;
}
button {
background: linear-gradient(to right, #2c12f3, #ff0000);
color: #fff;
border: none;
padding: 10px 20px;
cursor: pointer;
}
button:hover {
background: linear-gradient(to right, #ff0000, #070ff2);
}
</style>
<script>
var downloadBtn = document.getElementById('downloadBtn');
var textArea = document.getElementById('textArea');
downloadBtn.addEventListener('click', function() {
var text = textArea.value;
var filename = 'pomsd.txt';
var blob = new Blob([text], { type: 'text/plain' });
// Create a temporary link element
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
// Simulate a click to trigger the download
link.click();
// Clean up the temporary link
/*-- https://priyanshuomsd.blogspot.com --*/
link.remove();
});
</script>
-webkit-box-shadow: 5px 5px 15px 5px #000000;
box-shadow: 5px 5px 15px 5px #000000;
Also Read this Posts
- Screen Recorder HTML,CSS and JS || Blog,Website
- How to Customize Audio Player HTML Css in Blogger
- How to Add Target Tooltip with Title HTML and Css in Blogger
- Animated Gradient Color Background HTML and Css
- Hide Sidebar in Blogger || Css || Blog
- Top 5 Free Fire Bundles 3D Model in Free
- Motu,Patlu, Dr. Jhatka and Ghasitaram 3d Model
- Countdown Clock HTML CSS and JS
- Internet Detector || Css,HTML,JS || Script for Your Website
- Search by Your Voice HTML CSS and JS || SearchBar || for Blogger
- Animated Links Hover Effect HTML,Css
Contact Us!
0 Comments
type your comment...