gpt4 book ai didi

html - 强制缩小 HTML 页面

转载 作者:太空宇宙 更新时间:2023-11-03 19:15:45 26 4
gpt4 key购买 nike

所以我设计了一个页面,它在我的浏览器中可以在本地完美运行,但是当我将 HTML 复制到共享点时,页面末尾有一个长而空的尾部。如此处所示:

enter image description here

我该如何摆脱它?我试过像这样强制高度:

html,body { height:600px }

但是没有骰子。有任何想法吗?非常感谢!

对于那些问过的人,这里是代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<style type="text/css">
html,body { height:400px; }
.body1{font-family:helvetica; font-size:8px;}
.backgroundstory{
background-image:url('/connect/PublishingImages/partnerandjoin.png');
background-repeat:no-repeat;
background-position:right top;
}
h2.pos_upCAM
{
position:relative;
top:-35px;
left:-55px;
}
h2.pos_upLN
{
position:relative;
top:-30px;
right:-105px;
}
h2.pos_leftHEAD
{
position:relative;
left:-65px;
}
h2.pos_leftCON
{
position:relative;
left:-120px;
}
h2.pos_leftTEXT1
{
position:relative;
left:-40px;
}
h2.pos_leftP
{
position:relative;
right:-145px;
top:-530px;
}
h2.pos_leftT2
{
position:relative;
top:-665px;
right:-105px;
}
h2.pos_leftGC
{
position:relative;
top:-595px;
right:-510px;
}
h2.pos_leftSU
{
position:relative;
right:-145px;
top:-600px;
}
h2.pos_leftT3
{
position:relative;
top:-725px;
right:-105px;
}
h2.pos_leftMD
{
position:relative;
top:-625px;
right:-155px;
}
</style>
</head>
<body>
<div style="height:400px;">
<div Class="body1">
<h2 class="pos_leftHEAD">
<div>
<img src="/connect/PublishingImages/header.png" />
</div>
</h2>
<h2 class="pos_upLN">
<div style="float:right; margin-left:5px;">
<img src="/connect/PublishingImages/lnkButton.png" />
</div>
</h2>
<h2 class="pos_upLN">
<div style="float:right;">
<img src="/connect/PublishingImages/fbookbutton.png" />
</div>
</h2>
<h2 class="pos_upCAM">
<div style="float:left;">
<img src="/connect/PublishingImages/cambut.png" />
</div>
</h2>
<h2 class="pos_leftCON">
<div>
<img src="/connect/PublishingImages/connect.png" />
</div>
</h2>
<h2 class="pos_leftTEXT1">
<div style="width:350px;"> <br/>
When we met 16 years ago as coach and student-athlete, we never imagined we would be working together as colleagues, asking you to join us in all the great things going on here at the College of Business. It goes to show that you never know when that one connection will make a difference of a lifetime.
<br/><br/>
That’s why we’re reaching out to ask you to connect with us. Many of you are former students, and many of you have already supported the College through scholarships, faculty, fellowships, and building and program support. No matter what your affiliation with the College is, we want to stay in touch, see you at our events, and get to know you better. Whether you live near or far, good memories, relationships, and a desire to keep giving back is what we have in common. It’s what keeps us connected.
<br/><br/>
We look forward to your partnership and to seeing you at one of our upcoming events. We hope you connect!
<br/><br/><br>
Best regards,
<br/><br/>
Sonny Lubick,
<br/>
Director of Community Leadership Outreach
<br/>
College of Business
<br/>
CSU Rams Head Football Coach, 1993-2007
<br/><br/>
Erick Olson
<br/>
Director of Development
<br/>
College of Business
<br/>
CSU Rams Football Student-Athlete, 1996-1999
</div>
</h2>
<div style="float:right;">
<h2 class="pos_leftP">
<div style="float:right;">
<img src="/connect/PublishingImages/partnerandjoin.png" />
</div>
</h2>
<h2 class="pos_leftT2">
<div style="float:right; width:380px;">
We hope you will join us for CONNECT networking and major events hosted by the College of Business. We schedule regular activities across the nation, many times to coincide with University football games or other significant events. We look forward to seeing you there!
</div>
</h2>
<h2 class="pos_leftGC">
<div style="float:right;">
<img src="/connect/PublishingImages/getcon.png" />
</div>
</h2>
<!-- Show up! -->
<h2 class="pos_leftSU">
<div style="float:right;">
<img src="/connect/PublishingImages/showup.png" />
</div>
</h2>
<h2 class="pos_leftT3">
<div style="float:right; width:380px;">
By joining CONNECT, you are becoming a regular financial supporter of the Colorado State University College of Business. Funds will support CONNECT events and communications to help keep the College of Business family connected. In addition, you will receive custom CSU College of Business gifts. Your contribution, no matter how large or small, helps drive the College forward by supporting students, programs, and other important initiatives.
</div>
</h2>
<h2 class="pos_leftMD">
<div>
<img src="/connect/PublishingImages/makeadiff.png" />
</div>
</h2>
</div>
</div>
</div>
</body>

最佳答案

简单。无论您使用什么白色背景(div、表格等),只需添加 height: 600px;在那里,应该这样做。

或者,如果您想查看额外空间的来源,请发布代码,我会看一看!

乔纳

关于html - 强制缩小 HTML 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6687754/

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