简体   繁体   English

如何在不同尺寸的屏幕上使导航完整显示?

[英]How do I make my navigation appear intact across different screen sizes?

I am just starting out as a front-end developer and I noticed a lot things that I have to learn. 我刚开始只是一个前端开发人员,我注意到了很多必须学习的东西。 One of the key things is that my screen is currently 13 inches long so when I design it on that it looks perfect but when I go to a larger size, say 24 or higher the menu options look more aligned to the left than centered or the way they look on my screen size. 关键之一是我的屏幕目前只有13英寸长,因此当我在其上进行设计时,它看起来很完美,但是当我选择更大的尺寸(例如24或更高)时,菜单选项看起来比左侧居中或对齐更靠左。它们在我的屏幕尺寸上的显示方式。

I am aware of cross-browser issues but never some thing like this. 我知道跨浏览器的问题,但从来没有像这样的事情。 Going forward, what's the best way to make sure that the site looks the same regardless of screen size? 展望未来,无论屏幕大小如何,确保网站外观相同的最佳方法是什么? I will really appreciate any tips. 我将非常感谢任何提示。 Thanks! 谢谢!

It is generally not a good idea to try to make "the site look the same regardless of screen size". 尝试使“无论屏幕大小如何,网站看起来都一样”通常不是一个好主意。 First, it will not look the same and second it is a good idea to provide different styles for different screen sizes, especially very small ones (mobile). 首先, 外观看起来不一样 ,其次,为不同的屏幕尺寸(尤其是非常小的屏幕尺寸)提供不同的样式是个好主意。

When you search for "responsive design" you will find tons and tons of information about that. 当您搜索“响应式设计”时,您会发现无数有关此信息。 The most important thing though is to use relative units like % and em instead of absolute ones like px . 但是,最重要的是使用相对单位(例如%em而不是绝对单位(例如px And when you want to center things, have you tried text-align: center; 当您想将内容居中时,是否尝试过text-align: center; ?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使我的块引用响应不同的屏幕尺寸? - How do i make my blockquote responsive to different screen sizes? 如何使导航栏遍及整个屏幕? - How do I make my navigation bar go across the whole screen? 如何使导航栏延伸到整个屏幕? - How Do I Get My Navigation Bar To Stretch Across The Screen? 如何放置底部菜单,使其在不同屏幕尺寸下都位于页面底部上方? - How can I position my bottom menu so that it stays above the bottom of the page across different screen sizes? 如何使我的自定义HTML小部件在不同的屏幕尺寸下显示不同? - How can I make my custom HTML widgets show differently for different screen sizes? 如何使倾斜的边框在不同屏幕尺寸CSS3上保持正确的位置 - How to make slanted border stay in correct position across different screen sizes CSS3 如何在不同的屏幕尺寸上将导航栏居中 - How can I center my navbar on different screen sizes 如何使该网站适合所有屏幕尺寸? - How do I make this website fit all screen sizes? 如何使某些图像以某些屏幕尺寸显示? - How do I make certain images display at certain screen sizes? 即使屏幕分辨率发生变化,如何使图像在页面上移动 - How do i make my image move across the page even when the resolution of screen changes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM