【问题标题】:Full image html in website网站中的完整图像 html
【发布时间】:2017-05-08 22:41:20
【问题描述】:

我想问。如何为标题制作完整的图像,如 html 中的图像?有人可以给我一些关于创建那个东西的参考吗?谢谢。

【问题讨论】:

  • 只需添加高度:100%;宽度:100%;作为风格

标签: html css


【解决方案1】:

如果你想固定背景,你可以这样做。

body { 
background-image: url('w3css.gif');
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
height: 100%;
}

【讨论】:

    【解决方案2】:

    background-size: cover 可能就是您要找的。​​p>

    【讨论】:

      【解决方案3】:
      .class{ 
      background-image: url('img/background.jpg') no-repeat;
      background-attachment: fixed;
      background-size:cover;
      height: 100vh;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-03-23
        • 2021-11-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-01-24
        相关资源
        最近更新 更多