html - 如何在不创建 slider 并继续此页面的情况下将图像拉伸(stretch)到整页高度?

标签 html css

图像后退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>

enter image description here

最佳答案

<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/

相关文章:

html - 列表中的每个 child 都应该有一个唯一的 "key" Prop

javascript - wipro 网站中幻灯片脚本的名称是什么?

javascript - 单击 html bootstrap 时禁用图像

javascript - 向上/向下键盘箭头自动滚动

html - 通过另一个列表后如何使导航栏保持粘性?

html - html2pdf是否支持渐变

python - 正则表达式:匹配两个项目之间的文本

php - 联系表单脚本未运行,白页

javascript - 在程序的不同阶段使用 Snack bar 功能的不同元素

javascript - 隐藏 <span> 直到 <div> 悬停