当我将其调整到最小的宽度和/或使我的网页响应迅速的宽度时,请提供代码的帮助,以显示我的完整网页。
我目前正在我的个人网站上工作,但是我很难尝试使我的代码正确工作。
我要发布图片,以显示我在查看的内容我的网站上的宽度最大和我的网站最小的宽度,我还将添加链接到我的网站和链接到我的github代码
我正在寻找可以指向正确方向的信息/代码,或者帮助我让我的网站响应
在此处的大小>”和“< div>”我想要响应迅速(我不确定这是否应该在这里看的地方,但我确实知道这一切都应该放入 @media仅屏幕和(max宽:1000px){} )
body{
font-family: 'Press Start 2P', cursive;
margin: 0;
}
.main-area{
display: flex;
height: 100%;
justify-content: space-between;
align-items: center;
}
I am currently working on my personal website, yet I am having trouble trying to get my code to work correctly.
I am going to post pictures to show what I am looking at My website at the largest width and My website at the smallest width, and I will also add the link to my website and the link to my GitHub code
I am looking for information/code/anything that can point me in the right direction or help me get my website to be responsive to resizing
Here is the css code for my "< body >" and the "< div >" i want responsive (I am not sure if this is where i am supposed to be looking at either but i do know it all should be put in @media only screen and (max-width:1000px){})
body{
font-family: 'Press Start 2P', cursive;
margin: 0;
}
.main-area{
display: flex;
height: 100%;
justify-content: space-between;
align-items: center;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您要朝正确的方向前进。只需增加一些断点即可。
如果不可能,所有这些都至少为移动设备添加一个
(最大宽度:768px)
和一张平板电脑。最小宽度
表示您首先设计移动设备,然后向上进行较大的屏幕,max Width
表示您先设计桌面,然后打破较小的屏幕。然后在这些断点内添加了元素的规则。
就像您的
Main-Araea
一样,您可以这样做:它将使主体区域对移动设备看起来更好。像这种更改的属性一样,所有其他必要的元素并进行调整以使它们看起来更好,例如使图标更大并调整填充等。
You are going in the right direction. Just add a few more breakpoints.
if not possible for all of them add at least one for mobile devices
(max-width: 768px)
and one for tablets.min-width
means you are designing mobile first and then going upwards to larger screens andmax-width
means you are designing desktop first and then breaking for smaller screens.Then inside those breakpoints add rules for the elements.
Like for your
main-area
you can do it something like this:it will make the main area look nicer for mobile devices. And like this change properties for all other necessary elements and make adjustment to make them look nicer for example making the icons bit larger and adjusting the padding etc.