gpt4 book ai didi

html - html5页面的对齐方式

转载 作者:行者123 更新时间:2023-11-28 13:35:23 25 4
gpt4 key购买 nike

问题是我没能找出我对齐的问题我试图在 css 中限制带有中心顶部的标题横幅,但失败了,我的文本没有对齐中心,如果以较低的分辨率查看,它正在向下移动任何人都可以找出问题的原因

html {
min-height: 20%;
max-height: 80%;
max-width: 80%;
background-size: cover;
background-image: url();
background-repeat: no-repeat;
background-position: center top;
}

body {
min-height:80%;
width: 800px;
max-width: 90%;
margin-top:550px;
font-size: 30px;

}我的代码 css 在上面,下面是我的网站链接 http://design3web.in/test1/

最佳答案

取决于你想要达到的目标。要使页面居中,请使用 body { margin:auto; } 并从 html 中删除 max-width: 80%;

关于html - html5页面的对齐方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13053778/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com