feat(样式): 添加移动端适配样式文件并引入
添加 mobile.css 文件实现移动端样式优化,并在 index.php 中通过媒体查询引入 主要针对屏幕宽度小于768px的设备进行布局调整,包括表单元素、按钮、容器等组件的响应式设计
This commit is contained in:
parent
bbbf936bdd
commit
b0df31fde2
@ -105,6 +105,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>内容投稿系统</title>
|
||||
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="mobile.css" media="only screen and (max-width: 768px)">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
|
90
mobile.css
Normal file
90
mobile.css
Normal file
@ -0,0 +1,90 @@
|
||||
/* mobile.css - 前台投稿页面移动端优化样式 */
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
padding: 5px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.container {
|
||||
max-width: 100vw;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.header {
|
||||
padding: 20px 5px;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.form-container {
|
||||
padding: 10px 2px !important;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.form-group label {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.form-group input,
|
||||
.form-group textarea,
|
||||
.form-group select {
|
||||
font-size: 16px;
|
||||
padding: 10px 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.form-group textarea {
|
||||
min-height: 60px;
|
||||
}
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary {
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
padding: 14px 0;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.btn-group {
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
}
|
||||
.tab-container {
|
||||
flex-direction: column;
|
||||
border-radius: 0;
|
||||
}
|
||||
.tab {
|
||||
padding: 14px 0;
|
||||
font-size: 1rem;
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
.form-section {
|
||||
padding: 0;
|
||||
}
|
||||
.checkbox-group {
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.platform-warning {
|
||||
font-size: 13px;
|
||||
padding: 8px;
|
||||
}
|
||||
.message {
|
||||
font-size: 1rem;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.pagination {
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
}
|
||||
.modal-content {
|
||||
width: 98vw;
|
||||
max-width: 100vw;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user