图像后退2!
有必要白色是页面的高度(即没有创建页面的延续)
有一张图片,您希望将其拉伸(stretch)到整个页面的高度,而无需在此页面下方创建滚动条
代码:
<html>
<head>
<title>text</title>
<link rel="shortcut icon" href="favicon.png" type="image/png" />
<style>
body{
background: url(back.jpg) no-repeat;
-moz-background-size: cover;
-webkit-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
</head>
<body style="background-attachment:fixed" topmargin="0">
<p align="center"><img src="back2.jpg" height="730" width="1300" > </p>
</body>
最佳答案
<html>
<head>
<title>Ответы на ОГЭ,ЕГЭ,ВПР,ОЛИМПИАДЫ</title>
<link rel="shortcut icon" href="favicon.png" type="image/png" />
<style>
body{
background: url(back.jpeg) no-repeat;
-moz-background-size: cover;
-webkit-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
</head>
<body style="background-attachment:fixed" topmargin="0">
<div style="text-align:center"><img src="back2.jpg" height=100% width="1300" >
</body>
</html>
关于html - 如何在不创建 slider 并继续此页面的情况下将图像拉伸(stretch)到整页高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57131285/