Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- setInterval 정지
- mySQL_Replication
- Replication
- timepicker
- listener 1883
- transfer
- pm2
- 1883
- 데이터테이블 데이터 넣기
- c# datagridview 데이터 넣기
- datagridview 직접입력
- DataGridView 직접 입력
- AntDesign
- DatePicker
- pm2 설치
- setInterval 외부 정지
- allow_anonymouse
- map이 undefined가 뜰 때
- 서버동기화
- mosquitto.conf
- invalid data
- setInterval clear
- pm2 확인
- pm2 시작
- mosquitto
- 맥 어드레스
- setInterval 중지
- pm2 상태 확인
- html #select #option #multiple
- 공인IP
Archives
- Today
- Total
개발 노트
간단한 계산기 본문
* {
font-size: 40px;
}
h1 {
color: #ffffff;
}
body {
background-color: #000000;
}
article {
display: flex;
flex-direction: column;
}
.center {
text-align: center;
}
.calculator {
width: 287px;
border: 6px solid rgb(33, 182, 58);
background-color: #ffffff;
padding: 6px;
display: inline-block;
}
.calculator form {
display: grid;
grid-template-columns: repeat(4, 65px);
grid-auto-rows: 65px;
grid-gap: 5px;
}
.calculator form input {
border: 2px solid #333;
cursor: pointer;
}
.calculator form input:hover {
box-shadow: 1px 1px 2px #333;
}
.calculator form .clear {
background-color: #ed8848;
}
.calculator form .operator {
background-color: #f65;
}
.calculator form .dot {
background-color: lightgreen;
}
.calculator form input[type="text"] {
grid-column: span 4;
text-align: right;
padding: 0 10px;
}
.calculator form .clear {
grid-column: span 3;
}
.calculator form .result {
grid-column: span 2;
}
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>계산기</title>
<meta name="description" content="간단한 계산을 위한 웹 계산기입니다." />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="center">
<h1>계산기</h1>
<div class="calculator">
<form name="forms">
<input type="text" name="output" readonly />
<input
type="button"
class="clear"
value="지우기"
onclick="document.forms.output.value=''"
/>
<input type=button class=operator value=/
onclick="document.forms.output.value+='/'">
<input
type="button"
value="1"
onclick="document.forms.output.value+='1'"
/>
<input
type="button"
value="2"
onclick="document.forms.output.value+='2'"
/>
<input
type="button"
value="3"
onclick="document.forms.output.value+='3'"
/>
<input
type="button"
class="operator"
value="*"
onclick="document.forms.output.value+='*'"
/>
<input
type="button"
value="4"
onclick="document.forms.output.value+='4'"
/>
<input
type="button"
value="5"
onclick="document.forms.output.value+='5'"
/>
<input
type="button"
value="6"
onclick="document.forms.output.value+='6'"
/>
<input
type="button"
class="operator"
value="+"
onclick="document.forms.output.value+='+'"
/>
<input
type="button"
value="7"
onclick="document.forms.output.value+='7'"
/>
<input
type="button"
value="8"
onclick="document.forms.output.value+='8'"
/>
<input
type="button"
value="9"
onclick="document.forms.output.value+='9'"
/>
<input
type="button"
class="operator"
value="-"
onclick="document.forms.output.value+='-'"
/>
<input
type="button"
class="dot"
value="."
onclick="document.forms.output.value+='.'"
/>
<input
type="button"
value="0"
onclick="document.forms.output.value+='0'"
/>
<input
type="button"
class="operator_result"
value="="
onclick="document.forms.output.value=eval(document.forms.output.value)"
/>
</form>
</div>
</div>
</body>
</html>
'프로그래밍 > Html' 카테고리의 다른 글
html 리스트태그 연습 1 (0) | 2022.05.30 |
---|---|
Html 링크걸기 (0) | 2022.05.30 |
Html 기술 (0) | 2022.05.16 |
Html 연습하기 (0) | 2022.05.16 |
html 기본 구조 코드 (0) | 2021.12.27 |