Bläddra i källkod

视频适应手机

moshaorui 6 dagar sedan
förälder
incheckning
4b39066f42
2 ändrade filer med 55 tillägg och 1 borttagningar
  1. 54 0
      public/static/css/main.css
  2. 1 1
      resources/views/gallery-detail.blade.php

+ 54 - 0
public/static/css/main.css

@@ -1754,6 +1754,60 @@ table.album_table button {
 table.album_table button:hover {
   background-color: #d97707;
 }
+
+/* 移动端适配 */
+@media (max-width: 768px) {
+    /* 隐藏表头 */
+    .album_table thead {
+        display: none;
+    }
+    .album_table tbody tr {
+        display: block;
+        margin-bottom: 20px;
+        border: 1px solid #ddd;
+        border-radius: 4px;
+    }
+
+    .album_table td {
+        display: flex;
+        flex-direction: column;
+        padding: 8px;
+        border: none;
+    }
+
+    .album_table td::before {
+        content: attr(data-label);
+        font-weight: bold;
+        margin-bottom: 4px;
+        color: #666;
+    }
+
+    .album_table td[data-label] {
+        display: flex;
+        text-align: left;
+    }
+
+    /* 为每个td添加数据标签 */
+    .album_table td:nth-child(1) { data-label: "图片"; }
+    .album_table td:nth-child(2) { data-label: "中文标题"; }
+    .album_table td:nth-child(3) { data-label: "英文标题"; }
+    .album_table td:nth-child(4) { data-label: "操作"; }
+
+    /* 调整操作按钮布局 */
+    .album_table td:last-child {
+        flex-direction: row;
+        gap: 8px;
+    }
+
+    .album_table button {
+        padding: 6px 12px;
+        font-size: 14px;
+    }
+}
+
+
+
+
 /* 视频遮罩层样式 */
 .overlay {
   display: none;

+ 1 - 1
resources/views/gallery-detail.blade.php

@@ -17,7 +17,7 @@
     <link rel="stylesheet" href="/static/css/magnific-popup.min.css">
     <link rel="stylesheet" href="/static/css/animate.min.css">
     <link rel="stylesheet" href="/static/js/layui/css/layui.css">
-    <link rel="stylesheet" href="/static/css/main.css">
+    <link rel="stylesheet" href="/static/css/main.css?v=2025041601">
 
 </head>
 <style>