Skip to content

Commit 74644a5

Browse files
Implement modal with open and close functionality
Added modal functionality with styles and scripts.
1 parent 6bf90ee commit 74644a5

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

projects.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,33 @@ author_profile: true
4545
function openModal(id) {
4646
document.getElementById(id).style.display = "block";
4747
}
48+
49+
.modal {
50+
display: none;
51+
position: fixed;
52+
z-index: 1000;
53+
left: 0; top: 0;
54+
width: 100%; height: 100%;
55+
background-color: rgba(0,0,0,0.8);
56+
}
57+
58+
.modal-content {
59+
background-color: #111;
60+
margin: 10% auto;
61+
padding: 20px;
62+
border: 2px solid #00ffe7;
63+
width: 80%;
64+
color: #e0f7fa;
65+
box-shadow: 0 0 20px #00ffe7;
66+
}
67+
68+
.close {
69+
color: #00ffe7;
70+
float: right;
71+
font-size: 28px;
72+
cursor: pointer;
73+
}
74+
4875
function closeModal(id) {
4976
document.getElementById(id).style.display = "none";
5077
}

0 commit comments

Comments
 (0)