我一整天都在嘗試讓我的網站更具響應性,當我縮小屏幕時,頂部 div 占據了整個屏幕我是響應式網頁設計的新手,我很確定這與第 734 行有關,我希望 div當我更改屏幕寬度但仍然可見時,要變小,代碼可在https://matthew-spina.github.io/Mathew-Spina.github.io/posts/Top-Ten-Ways-I-找到Got-Domain-Admin-on-Your-Internal-Network.html預期產出代碼<html class=""><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>My Portfolio</title> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet"> <link rel="stylesheet" href="libs/font-awesome/css/font-awesome.min.css"> <link href="css/bootstrap.min.css" rel="stylesheet"><style>#HEADER_1 { bottom: 0; box-sizing: border-box; color: #fff; height: 296px; left: 0; position: relative; right: 0; text-align: center; text-decoration: none solid #fff; text-rendering: optimizelegibility; text-size-adjust: 100%; top: 0; width: 100%; column-rule-color: #fff; perspective-origin: 590px 148px; caret-color: #fff; background: #293a5c none repeat scroll 0 0/auto padding-box border-box; border: 0 none #fff; font: 18px/32.4px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; outline: #fff none 0; overflow: hidden}#HEADER_1:after { box-sizing: border-box; color: #fff; text-align: center; text-decoration: none solid #fff; text-rendering: optimizelegibility; text-size-adjust: 100%; column-rule-color: #fff; caret-color: #fff; border: 0 none #fff; font: 18px/32.4px Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; outline: #fff none 0}
1 回答

繁華開滿天機
TA貢獻1816條經驗 獲得超4個贊
header
您是否知道HTML 中有兩個單獨的標簽實例?因此,在 CSS 中,無論您在何處定義標簽樣式,header
它都會應用于兩個實例。
這不在您附加的代碼中,但在您引用的 HTML 頁面上。在 max-width 768px 處,您的媒體查詢的display: none;
值為header
. 你嘗試過刪除它嗎?
- 1 回答
- 0 關注
- 92 瀏覽
添加回答
舉報
0/150
提交
取消