gpt4 book ai didi

html - 背景适合屏幕,表格不适合

转载 作者:行者123 更新时间:2023-11-28 07:30:02 25 4
gpt4 key购买 nike

我已经有一段时间没在这里发帖了!

在我的网站上,我最近有一个新的登录屏幕,该屏幕只有一张没有代码的图片,我在上面放了透明的表格。我必须指定表格的位置以匹配图像。然而,我完全忘记了图像适合屏幕,所以虽然它在我的全屏上看起来不错,但如果我调整它的大小,表格与我想要的位置不一致。你可以在我的网站上看到 - www.velrania.com。

那么有没有一种方法可以在保持“适合屏幕”的同时将表单保留在它们应该在的特定位置?我熟悉 CSS 和 html,但会研究任何其他语言来完成这项工作。

如果您需要,这里是索引页面的代码:

<style>
body {
background-image: url(images/home.jpg);
}

.username{
background-repeat:no-repeat;
width:265px;
height:27px;
border-color: transparent;
background-color: transparent;
position: absolute;
left: 906px;
top: 325px;
}

.password{
background-repeat:no-repeat;
width:265px;
height:27px;
border-color: transparent;
background-color: transparent;
position: absolute;
left: 906px;
top: 395px;
}

.register{
background-repeat:no-repeat;
width:420px;
height:40px;
background-color: transparent;
left: 750px;
top: 585px;
cursor:pointer;
border:none;
line-height: 100;
overflow: hidden;
position: absolute;
}

.save
{
background-repeat:no-repeat;
width:200px;
height:75px;
cursor:pointer;
background-color: transparent;
border:none;
line-height: 100;
overflow: hidden;
position: absolute;
left: 860px;
top: 475px;
}
</style>
<body background="images/home.jpg">

<form action="login.php" method="post">
<input type="text" name="usermail" class="username"/><br /><br />
<input type="password" name="password" class="password"/><br /><br />
<input type="submit" class="save" /><input type="hidden" name="Login" />
</form>
<form action="register.php" method="post">
<input type="submit" class="register"/>

</form>
</body>

最佳答案

试试这个

body {
background-image: url(images/home.jpg);
margin: 0px;
}

关于html - 背景适合屏幕,表格不适合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31582552/

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