如何拉伸ie8,ie9,chrome和mozila的背景图片? [英] How to stretch background image for ie8,ie9,chrome and mozila ?

查看:115
本文介绍了如何拉伸ie8,ie9,chrome和mozila的背景图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai

如何拉伸ie8,ie9,chrome和mozila的背景图片?

Hai
How to stretch background image for ie8,ie9,chrome and mozila ?

<head>
<title>TITLE HERE</title>
<link href="styles/all.css" rel="stylesheet" />
<!--[if lte IE 8]>
        <link href="styles/ie8.css" rel="stylesheet" />
<![endif]-->
</head>
<body style="margin: 0px; overflow: auto">
<form id="form1" runat="server">
<table  width="100%"  id ="tbllogin">----id is calling css styles
     <tr>
      <td style="width: 100%">
      </td>
     </tr>
  </table>
</form>
</body>





实际上我有两个样式表all.css和ie8.css。

all.css for ie9,chrome和mozila。

ie8.css仅适用于ie8。

在我的html代码中它将工作ie8但css不适用于ie9,chrome和mozila。



in all.css有这个代码



Actually i have two stylesheet all.css and ie8.css.
all.css for ie9,chrome and mozila.
ie8.css for ie8 only.
In my html code it will work ie8 but css not work for ie9,chrome and mozila.

in all.css having this code

#tbllogin
{    
    background-size: 100% 100%;
    background-image: url("images/bckgrd.png");
    background-repeat: repeat-y;
    background-attachment: inherit;
}




带有此代码的ie8.css中的




in ie8.css having this code

#tbllogin
{
    background-size: 100% 100%;
    background-repeat: repeat;
    background-image: url("images/bckgrd.png");
    background: no-repeat center center fixed;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( src="images/bckgrd.png", sizingMethod="scale");
}



我需要的是如何根据浏览器调用不同的样式表

if ie 8 i需要调用ie8.css和其他浏览器需要调用all.css



如何检查ie8或其他浏览器并需要调用特定的CSS?

上面的内部标签ie8正常工作但其他浏览器没有调用all.css样式表。



请尽快回复。



问候

Aravind


My need is how to call different stylesheet based on browser
if ie 8 i need to call ie8.css and other browsers need to call all.css

How to check ie8 or other browsers and need to call particular css ?
The above inside head tag ie8 correctly work but other browser not call the all.css style sheet.

Pls reply asap.

Regards
Aravind

推荐答案

#tbllogin
{    
    background-size: 100% 100%;
    background-image: url("images/bckgrd.png");
    background-repeat: repeat-y;
    background-attachment: inherit;
    -webkit-background-size: 100% 100%;
    -moz-background-size: 100% 100%;
    -o-background-size: 100% 100%;
    -ms-background-size: 100% 100%;
}






你可以用css作为背景。

这里是css



you can use the css for background.
here is the css
background-size:cover


背景:包含;

背景:100%100%;
background:contain;
background:100% 100%;


这篇关于如何拉伸ie8,ie9,chrome和mozila的背景图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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