Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
251 changes: 251 additions & 0 deletions lotto.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
/* 전체 화면 배경과 폰트 설정 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
}

.Frame {
width: 520px;
background-color: white;
border-radius: 10px;
padding: 20px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.BannerBox {
background-color: #4b89dc;
width: 100%;
height: 98px;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.LottoNumberGenerate {
font-size: 24px;
color: white;
font-weight: bold;
}

.LuckyNumber {
font-size: 16px;
color: white;
font-weight: bold;
}

.GenerateBox {
display: flex;
flex-direction: column;
margin-left: 10px;
}

.NumberGenerate {
font-size: 18px;
font-weight: bold;
margin-top: 10px;
margin-bottom: 20px;
}

.LottoNumbers {
display: flex;
margin-bottom: 20px;
}

.Circle {
width: 45px;
height: 45px;
background-color: #ddd;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 25px;
color: white;
margin-left: 30px;
/* 작은 간격으로 수정 */
}

#yellow {
background-color: #FBC400;
}

#blue {
background-color: #69C8F2;
}

#red {
background-color: #FF7272;
}

#gray {
background-color: #AAAAAA;
}

#green {
background-color: #B0D840;
}

.NumberGenerateBox {
display: flex;
}

.NumberGenerateButton {
width: 480px;
height: 40px;
background-color: #4b89dc;
border-color: white;
color: white;
font-size: 16px;
font-weight: bold;
border-radius: 5px;
}

.BuyLottoBox {
display: flex;
flex-direction: column;
margin-left: 10px;
}

.BuyLotto {
font-size: 18px;
font-weight: bold;
color: black;
margin-top: 10px;
margin-bottom: 15px;
}

.LottoAmountBox {
display: flex;
margin-bottom: 15px;
}

.Amount {
font-size: 16px;
}

.count {
width: 400px;
}

.TotalMoney {
font-size: 16px;
margin-bottom: 5px;
}

.Purchase {
width: 480px;
height: 40px;
background-color: #4b89dc;
border-color: white;
color: white;
font-size: 16px;
font-weight: bold;
border-radius: 5px;
}

.ResultBox {
width: 480px;
margin-top: 20px;
margin-left: 10px;
background-color: #f5f5f5;
border-radius: 5px;
border: none;
display: flex;
flex-direction: column;
padding: 20px;
}

.ResultHeader {
font-size: 18px;
font-weight: bold;
margin-top: 10px;
margin-left: 10px;
}

.ResultNumberBox {
display: flex;
justify-content: flex-start;
gap: 10px;
}

.ResultNumber {
font-size: 16px;
margin-left: 10px;
color: #000;
}

.MyNumberBox {
display: flex;
flex-direction: column;
margin-top: 10px;
}

.MyNumber {
font-size: 16px;
margin-left: 10px;
}

.ResultMessage {
font-size: 16px;
color: #000000;
margin-top: 10px;
margin-left: 10px;
}

.MyLottoNumbers {
display: flex;
flex-direction: row;
gap: 10px;
flex-wrap: nowrap;
margin-bottom: 10px;
/* 줄 간격 */
}

#lottoNumbers2 {
display: flex;
flex-direction: row;
gap: 10px;
margin-top: 20px;
}

#lottoNumbers3 {
display: flex;
flex-direction: row;
gap: 10px;
margin-top: 20px;
}

#resultMessage {
display: flex;
justify-content: center;
align-items: center;
width: 430px;
height: 41px;
background-color: #E8F4FD;
font-size: 16px;
font-weight: bold;
}

/* resultBox 제거 (하늘색 박스) */
.resultBox {
display: block;
margin-top: 15px;
padding: 10px;
background-color: #E8F4FD;
border-radius: 5px;
font-size: 16px;
font-weight: bold;
color: #000;
text-align: center;
display: inline-block;
width: 100%;
}
57 changes: 57 additions & 0 deletions lotto.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>로또 번호 생성기</title>
<link rel="stylesheet" href="lotto.css"/>
</head>
<body>
<div class="Frame">
<div class="BannerBox">
<div class="LottoNumberGenerate">로또 번호 생성하기</div>
<div class="LuckyNumber">행운의 번호를 생성해보세요!</div>
</div>
<div class="GenerateBox">
<div class="NumberGenerate">번호 생성</div>
<div class="LottoNumbers" id="lottoNumbers">
<div class="Circle" id="yellow">?</div>
<div class="Circle" id="blue">?</div>
<div class="Circle" id="red">?</div>
<div class="Circle" id="gray">?</div>
<div class="Circle" id="green">?</div>
<div class="Circle" id="yellow2">?</div>
</div>
<div class="NumberGenerateBox">
<button class="NumberGenerateButton" id="generateButton">번호 생성하기</button>
</div>
</div>
<div class="BuyLottoBox">
<div class="BuyLotto">로또 구매하기</div>
<div class="LottoAmountBox">
<div class="Amount">구매 수량:</div>
<input type="number" class="count" min="1" id="lottoCount"/>
</div>
<div class="TotalMoney" id="totalMoney">총 금액: 0원(1장당 1,000원)</div>
<div class="PurchaseBox">
<button class="Purchase" id="purchaseButton">구매하기</button>
</div>
</div>
<!-- 결과 영역 숨기기 -->
<div class="ResultBox" style="display: none;">
<div class="ResultHeader">당첨 결과 확인</div>
<div class="ResultNumberBox" id="resultNumberBox">
<div class="ResultNumber" id="resultLottoNumbers">이번 주 당첨 번호: </div>
</div>
<div class="LottoNumbers2" id="lottoNumbers2"></div>
<div class="MyNumberBox">
<div class="MyNumber" id="myLottoNumbers">내가 구매한 번호: </div>
</div>
<div class="LottoNumbers3" id="lottoNumbers3"></div>
<div class="ResultMessage" id="resultMessage"></div>
</div>
</div>

<script src="lotto.js"></script>
</body>
</html>
Loading