如何设置在Internet Explorer中工作的HTML背景图像? [英] How to set background image in html that work in Internet explorer?

查看:175
本文介绍了如何设置在Internet Explorer中工作的HTML背景图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下css代码在Internet Explorer中不起作用。请建议我在Internet Explorer中设置背景的解决方案。

The following css code is not working in internet explorer.. Please suggest me the solution that work in internet explorer to set background

body {
background: url("images/Login-BG.png") no-repeat center center fixed;

-moz-background-size: cover;

-webkit-background-size: cover;

-o-background-size: cover;

background-size: cover;
}


推荐答案

body {
    background: url("images/Login-BG.png") no-repeat center center fixed;

    -moz-background-size: cover;

    -webkit-background-size: cover;

    -o-background-size: cover;

    background-size: cover;
    height: 265px; /* considering that 265 is the image height */
}

这篇关于如何设置在Internet Explorer中工作的HTML背景图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆