forked from daldal-Mango/Miracle30
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request daldal-Mango#32 from SJLEE316/main
CSS
- Loading branch information
Showing
9 changed files
with
386 additions
and
130 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* tab */ | ||
.my_tab { | ||
display: flex; | ||
} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.certify_container { | ||
width: 40%; | ||
} | ||
.certify_list { | ||
list-style: none; | ||
margin: 0px; | ||
padding: 0px; | ||
} | ||
|
||
.certify_list li { | ||
margin-bottom: 10px; | ||
background: #f9f9ff; | ||
display: block; | ||
line-height: 40px; | ||
padding: 0px 18px; | ||
font-size: 14px; | ||
font-family: "Roboto", sans-serif; | ||
color: #777777; | ||
} | ||
|
||
span { | ||
float: right; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,34 @@ | ||
const btn = document.querySelectorAll(".btn"), | ||
pTag = document.getElementsByTagName('p'), | ||
modal = document.querySelector('.modal-body'); | ||
|
||
btn.forEach((elem, index) => { | ||
elem.addEventListener("click", (e) => { | ||
var data = pTag[index + 1].textContent; | ||
modal.textContent = data; | ||
}); | ||
// modal 창 띄우기 | ||
const modal = document.getElementById("myModal"), | ||
modalBtn = document.querySelectorAll(".btn"), // 버튼 누르면 모달버튼 뜸 | ||
closeBtn = document.querySelector(".close"); | ||
|
||
// modalBtn.onclick = function () { | ||
// modal.style.display = "block"; | ||
// }; | ||
|
||
closeBtn.onclick = function () { | ||
modal.style.display = "none"; | ||
}; | ||
|
||
window.onclick = function (event) { | ||
if (event.target == modal) { | ||
modal.style.display = "none"; | ||
} | ||
}; | ||
|
||
// 데이터 넣기 | ||
// const btn = document.querySelectorAll(".btn"), | ||
const pTag = document.getElementsByTagName("p"), | ||
modalBody = document.querySelector(".modal-body"); | ||
|
||
modalBtn.forEach((elem, index) => { | ||
elem.addEventListener("click", (e) => { | ||
console.log(elem, index); | ||
modal.style.display = "block"; | ||
let data = pTag[index].textContent; | ||
data = data.replace(/'/gi, ""); | ||
data = data.substr(1, data.length - 2); | ||
modalBody.textContent = data; | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const tabItem = document.querySelectorAll(".tab_item"); | ||
const tabContent = document.querySelectorAll(".content-container__content"); | ||
|
||
tabItem.forEach((item) => { | ||
item.addEventListener("click", tabHandler); | ||
}); | ||
|
||
function tabHandler(item) { | ||
const tabTarget = item.currentTarget; | ||
const target = tabTarget.dataset.tab; | ||
tabItem.forEach((title) => { | ||
title.classList.remove("active"); | ||
}); | ||
tabContent.forEach((target) => { | ||
target.classList.remove("target"); | ||
}); | ||
document.querySelector("#" + target).classList.add("target"); | ||
tabTarget.classList.add("active"); | ||
} |
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
Oops, something went wrong.