我有這個有角度的應用程序,我也想為移動版本添加響應式設計,現在它看起來很糟糕,我讀過有關<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes">但不起作用。在我的瀏覽器或手機上看起來是這樣的,如果我將手機更改為水平,我可以很好地看到頁面。這是我的index.html<!DOCTYPE html><html><head> <meta charset="utf-8" /> <title>Cv</title> <base href="/" /> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes"> <link rel="icon" type="image/x-icon" href="resumePhoto.png" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script></head><body> <app-root></app-root></body><!-- The core Firebase JS SDK is always required and must be listed first --><script src="/__/firebase/7.13.2/firebase-app.js"></script> <!-- TODO: Add SDKs for Firebase products that you want to use https://firebase.google.com/docs/web/setup#available-libraries --> <script src="/__/firebase/7.13.2/firebase-analytics.js"></script> <!-- Initialize Firebase --> <script src="/__/firebase/init.js"></script> </html>您可以在我的 github 中找到該存儲庫,或者這里是應用程序的鏈接 a>.有趣的是,如果我更改檢查器中的值,假設我將比例從 1 更改為 1.1,它會起作用,如果我將其返回到 1,我將繼續工作,但在一開始,它似乎被忽略了。我的問題是它看起來被切碎了,如果嘗試向右滾動我看不到頂部導航欄也沒關系。
視口寬度=設備寬度不起作用
慕田峪9158850
2023-12-19 21:37:30