Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
syhy0612 committed Jun 8, 2024
1 parent 0d8145a commit 2205677
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 13 deletions.
30 changes: 28 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,34 @@ <h2>备注信息</h2>
<div class="note">
<h2>发言信息</h2>
<div id="roles" class="note-input">
<span>01:</span>
<input type="text" value="">
<div class="role-entry">
<label for="input01">01:</label>
<input type="text" id="input01">
</div>
<div class="role-entry">
<label for="input02">02:</label>
<input type="text" id="input02">
</div>
<div class="role-entry">
<label for="input03">03:</label>
<input type="text" id="input03">
</div>
<div class="role-entry">
<label for="input04">04:</label>
<input type="text" id="input04">
</div>
<div class="role-entry">
<label for="input05">05:</label>
<input type="text" id="input05">
</div>
<div class="role-entry">
<label for="input06">06:</label>
<input type="text" id="input06">
</div>
<div class="role-entry">
<label for="input07">07:</label>
<input type="text" id="input07">
</div>
<input type="text" value="02:">
<input type="text" value="03:">
<input type="text" value="04:">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 6 additions & 7 deletions scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ function stopTimer() {
}

function resetNotes() {
// 弹出确认对话框
if (confirm('确定要重置所有笔记吗?')) {
if (confirm('确定重置吗?')) {
document.querySelectorAll('.note-input input, .note-input textarea').forEach(element => {
if (element.type === 'text' || element.nodeName === 'TEXTAREA') {
element.value = ''; // 清空所有输入和文本区域
}
});
//todo 复原部分信息
if (element.type === 'text')
element.value = '';
if (element.nodeName === 'TEXTAREA')
element.value = '警上:\n警下:';
})
}
}

Expand Down
33 changes: 29 additions & 4 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ body {
text-align: center;
}

.role-entry {
display: flex;
/* 使用 Flexbox 布局 */
align-items: center;
/* 垂直居中对齐标签和输入框 */
/* margin-bottom: 8px; */
/* 每个输入框之间的间距 */
}

/* 发言信息 */
.role-entry label {
margin-right: 10px;
font-size: 14px;
/* 标签和输入框之间的间隔 */
}

h1 {
text-align: center;
position: relative;
Expand All @@ -76,8 +92,19 @@ h1 {
text-align: left;
}

.note div {
margin-bottom: 10px;
#roles {
/* display: flex; */
/* 使用 Flexbox 布局 */
/* flex-wrap: wrap; */
/* 允许内容换行 */
gap: 10px;
/* 设置元素间的间隙 */
min-height: 200px;
/* 设置最小高度 */
width: 100%;
/* 容器宽度 */
padding: 10px;
/* 内部填充 */
}

input {
Expand All @@ -90,8 +117,6 @@ input {
font-size: 14px;
}



.button {
padding: 5px 10px;
margin-top: 10px;
Expand Down

0 comments on commit 2205677

Please sign in to comment.