재미로 읽는 정오의 뒹굴신 일기📓
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>플래시 카드</title>
<style>
body {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
.container {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
min-height: 100vh;
background-color: #f8f9fa;
position: relative;
z-index: 1;
}
.card {
width: 90%;
max-width: 400px;
height: 300px;
perspective: 1000px;
position: relative;
margin: 10px;
z-index: 2;
}
.card__face {
width: 100%;
height: 100%;
position: absolute;
backface-visibility: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 1.4em;
text-align: center;
border: 1px solid #ccc;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.6s;
background-color: #ffffff;
padding: 20px;
box-sizing: border-box;
}
.card__face--front {
background-color: #e6c27b;
}
.card__face--back {
background-color: #c4d8d2;
transform: rotateY(180deg);
}
.card.is-flipped .card__face--front {
transform: rotateY(180deg);
}
.card.is-flipped .card__face--back {
transform: rotateY(0deg);
}
.speaker-icon {
margin-top: 20px;
cursor: pointer;
font-size: 1.4em;
}
.logo {
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
width: 50px;
}
.card-number {
position: absolute;
top: 10px;
left: 50%;
transform: translateX(-50%);
font-size: 0.98em;
}
.text-line {
display: block;
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="container" id="card-container">
<!-- 카드가 여기에 동적으로 추가됩니다 -->
</div>
<script>
const cardData = [
{
number: 391,
frontText: "난 그녀와<br>결혼했어.",
backText: "I'm married to her.",
audioSrc: "https://blog.kakaocdn.net/dn/bdvzKc/btsJiIBfWzs/BWLsPEJdywdbnZhhC2ibDK/tfile.mp4"
},
{
number: 392,
frontText: "음주 운전하지 마.",
backText: "Don't drink and drive.",
audioSrc: "https://blog.kakaocdn.net/dn/l7eZ4/btsJiMjfG1W/EyRvkTRMwh6QjOtGUn5Ymk/tfile.mp4"
},
{
number: 393,
frontText: "내가 한 마디<br>해도 돼?",
backText: "Can I say something?",
audioSrc: "https://blog.kakaocdn.net/dn/bD85Uc/btsJhoDVWhK/AqM00kA0RA1thE9qlQBdE1/tfile.mp4"
},
{
number: 394,
frontText: "헐,<br>말도 안 돼.",
backText: "This is unreal.",
audioSrc: "https://blog.kakaocdn.net/dn/clOJLR/btsJhP8Xk5t/ByGTYbV7HkySr6kezlFAU0/tfile.mp4"
},
{
number: 395,
frontText: "이건 용납할<br>수 없어.",
backText: "This is unacceptable.",
audioSrc: "https://blog.kakaocdn.net/dn/QWNdG/btsJiFR5RBE/ixLUhFkuS6uQk0C5WKYCl1/tfile.mp4"
},
{
number: 396,
frontText: "우리 아직<br>해낼 수 있어.",
backText: "We can still pull this off.",
audioSrc: "https://blog.kakaocdn.net/dn/bBCnF8/btsJi4RwL40/8Z9uBWpbLcdF4R3vJAMxvK/tfile.mp4"
},
{
number: 397,
frontText: "우리 작전이<br>필요해.",
backText: "We need a plan.",
audioSrc: "https://blog.kakaocdn.net/dn/1xKPI/btsJhmMQlDs/0HxSVRgz4iZg2C2pB7gGO1/tfile.mp4"
},
{
number: 398,
frontText: "농담하는 거지.",
backText: "You've gotta be kidding me.",
audioSrc: "https://blog.kakaocdn.net/dn/cLAofz/btsJijaENl5/FVKW54Kl57dQSZr1GtOf60/tfile.mp4"
},
{
number: 399,
frontText: "여기서<br>나가자.",
backText: "Let's get out of here.",
audioSrc: "https://blog.kakaocdn.net/dn/0Avgc/btsJi5W3z5U/Foti19qV8LyS28YAayTYbk/tfile.mp4"
},
{
number: 400,
frontText: "실은 말이야,<br>근데 있잖아.",
backText: "Here's the thing.",
audioSrc: "https://blog.kakaocdn.net/dn/b7SBvb/btsJipokb4R/PguGQcsrShIEpPLvaWnls1/tfile.mp4"
}
];
const container = document.getElementById('card-container');
cardData.forEach((data, index) => {
const card = document.createElement('div');
card.className = 'card';
card.id = `card${index + 1}`;
card.innerHTML = `
<div class="card__face card__face--front">
<div class="card-number">${data.number}</div>
${data.frontText.split('<br>').map(line => `<span class="text-line">${line}</span>`).join('')}
<img src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbqWKHV%2FbtsIxkWWSCQ%2FH5ebr5KfDdnjvtA7y43if0%2Fimg.png" class="logo" alt="로고">
</div>
<div class="card__face card__face--back">
<div class="card-number">${data.number}</div>
${data.backText}
<div class="speaker-icon speaker-icon${index + 1}">🎧</div>
<audio id="audio${index + 1}" src="${data.audioSrc}"></audio>
<img src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbqWKHV%2FbtsIxkWWSCQ%2FH5ebr5KfDdnjvtA7y43if0%2Fimg.png" class="logo" alt="로고">
</div>
`;
container.appendChild(card);
});
function setupCard(cardId, audioId, speakerIconClass) {
document.querySelector(cardId).addEventListener('click', function() {
this.classList.toggle('is-flipped');
});
document.querySelector(speakerIconClass).addEventListener('click', function(event) {
event.stopPropagation();
var audio = document.querySelector(audioId);
audio.play();
});
}
cardData.forEach((_, index) => {
setupCard(`#card${index + 1}`, `#audio${index + 1}`, `.speaker-icon${index + 1}`);
});
</script>
</body>
</html>
🎧 영어 왕초보 기초 문법 강의 10강
https://www.youtube.com/playlist?list=PLaCVhPj5LHe6jILV8bE_C2LvqgFR7NbmS
🎧 1000문장 1탄(빈칸채우기)
🎧 1000문장 2탄(설명, 한글발음 有)
🔥뒹굴신 매운맛 영어회화 중급자용 재생목록
https://www.youtube.com/playlist?list=PLaCVhPj5LHe4QVKdVfhrKVhnryvRFCotk
'영어 한 줄 일기' 카테고리의 다른 글
영어 일기 I’ve been spotting so many mantises these days. (0) | 2024.09.02 |
---|---|
영어 일기 I used to be bad at swimming and 431-440 floating in the water.. (0) | 2024.09.01 |
영어 일기 It's been forever since I last went to a café without my.. (0) | 2024.08.31 |
영어 일기 I used to be so bad at taking pics of the moon, but lately.. (0) | 2024.08.30 |
영어 일기 Today was our third wedding anniversary, and it was so.. (0) | 2024.08.29 |
영어 일기 Every morning, I wake up and stretch my whole body for.. (0) | 2024.08.27 |
영어 일기 My cat absolutely loves getting his fur brushed. (0) | 2024.08.26 |
영어 일기 I always take an umbrella with me to block the sun.. (0) | 2024.08.25 |
영어 일기 I found this cool spread made (0) | 2024.08.24 |
영어 일기 The sun is rising much later these days. (0) | 2024.08.23 |
댓글