調整樣式

This commit is contained in:
Raymond Yang 2023-06-29 11:05:02 +08:00
parent e01756d12a
commit 2832ca4633
4 changed files with 31 additions and 20 deletions

View File

@ -1,3 +1,7 @@
html {
background-image: url("../img/background.jpg");
}
table {
background-color: #ffffffbb;
border-style: solid;
@ -15,29 +19,27 @@ hr {
border: 1px solid #2c6a99;
}
/* 未訪問超連結 */
a:link {
color: #000000;
}
/* 未訪問超連結 */
/* 已訪問超連結 */
a:visited {
color: #000000;
}
/* 已訪問超連結 */
/* 滑鼠移動到超連結上 */
a:hover {
color: #1070c4;
background-color: #ffffff;
}
/* 滑鼠移動到超連結上 */
/* 滑鼠點選時 */
a:active {
color: #0d5da3;
}
/* 滑鼠點選時 */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, label {
font-family: 'Arial', system-ui;
@ -48,6 +50,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, label {
}
.centerText {
font-family: 'Arial', system-ui;
text-align: center;
font-weight: bold;
}
@ -86,8 +89,6 @@ input[type="date"] {
color: #000000;
border-style: solid;
border-radius: 5px;
/*box-shadow: 0px 0px 5px rgba(66,66,66,.75);*/
/*text-shadow: -50px 0px 0px rgba(66,66,66,.0);*/
font-family: 'Arial', system-ui
}
@ -107,7 +108,6 @@ button {
background: -moz-linear-gradient(top, #4ab1ff, #0d5da3);
background: linear-gradient(to bottom, #4ab1ff, #0d5da3);
text-shadow: #591717 1px 1px 1px;
/*font: normal normal bold 15px arial;*/
font-family: 'Arial', system-ui;
color: #ffffff;
text-decoration: none;
@ -141,7 +141,6 @@ button:active {
background: -moz-linear-gradient(top, #ff4a4a, #a30d0d);
background: linear-gradient(to bottom, #ff4a4a, #a30d0d);
text-shadow: #591717 1px 1px 1px;
/*font: normal normal bold 15px arial;*/
font-family: 'Arial', system-ui;
color: #ffffff;
text-decoration: none;
@ -165,10 +164,12 @@ button:active {
.center {
width: fit-content;
height: 40px;
margin: 0 auto;
}
html {
background-image: url("../img/background.jpg");
.autosize-text {
font-size: 5vw;
font-family: 'Arial', system-ui;
text-align: center;
font-weight: bold;
}

View File

@ -14,11 +14,10 @@
</head>
<body>
<h1 class="centerText" id="title">新增/修改紀錄</h1>
<h1 class="autosize-text" id="my_title">新增/修改紀錄</h1>
<hr />
<h4>填寫方式掉刀填0正常出刀填X周-Y王。</h4>
<br />
<h4>傷害依照幹部規定要不要填,如不填可留空</h4>
<h4><p>填寫方式掉刀填0正常出刀填X周-Y王。</p></h4>
<h4><p>傷害依照幹部規定要不要填,如不填可留空</p></h4>
<hr />
<form id="record-form">
<table>

View File

@ -1,7 +1,7 @@
var paramValue = "";
var memberId = "";
var title = document.getElementById("title");
var title = document.getElementById("my_title");
var knife1_boss = document.getElementById("knife1_boss");
var knife1_damage = document.getElementById("knife1_damage");
@ -54,6 +54,8 @@ window.onload = function () {
});
};
document.addEventListener('resize', adjustTextSize);
document.getElementById("record-form").addEventListener("submit", function (event) {
event.preventDefault(); // 阻止表單預設提交行為
@ -76,6 +78,13 @@ document.getElementById("record-form").addEventListener("submit", function (even
);
});
function adjustTextSize() {
var screenWidth = window.innerWidth;
var fontSize = screenWidth * 0.04;
title.fontSize = fontSize + 'px';
}
function getParameterByName(name) {
// 获取 URL 中的参数部分
var url = window.location.href;

View File

@ -14,7 +14,9 @@
<body id="body">
<h1 class="centerText">成員管理</h1>
<hr>
<h4><a href="./new.html">新增成員</a></h4>
<div class="center">
<h4><a href="./new.html">新增成員</a></h4>
</div>
<hr>
<script src="https://cdn.jsdelivr.net/npm/axios@1.1.2/dist/axios.min.js"></script>
<script src="./js/index.js"></script>