소스 검색

feat(hugo): 使用移动端专用背景图

Daily Deploy Bot 15 시간 전
부모
커밋
be88831d28
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      site/static/css/site.css

+ 11 - 0
site/static/css/site.css

@@ -65,6 +65,17 @@ body {
   background-attachment: fixed, scroll, scroll, local;
 }
 
+/* 移动端优化:使用移动端专属背景图 */
+@media (max-width: 720px) {
+  body {
+    background-image: url("../background-mobile.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+    background-attachment: scroll;
+  }
+}
+
 a {
   color: var(--accent);
   text-decoration: none;