CSS背景,我知道如何使CSS3的魔术工作,但这将旧浏览器抛在了后面。我当前的代码是...
body
{
font-family : "Helvetica Neue", "HelveticaNeue", Helvetica, Arial;
font-size : 11px;
color : #000;
text-align : center;
margin : 0;
background : url('images/background.jpg') top center no-repeat, url('images/grassBackground.jpg') center center repeat-y;
background-size : 100%;
}
草背景需要重复,背景要有100%的宽度和保持比例。不确定如何在没有 CSS3 向后的情况下使其工作?
修复:
html {
height : 100%;
background : url('images/grassBackground.jpg') top center repeat-y;
background-size : 100%;
}
body
{
font-family : "Helvetica Neue", "HelveticaNeue", Helvetica, Arial;
font-size : 11px;
color : #000;
text-align : center;
margin : 0;
background : url('images/background.jpg') top center no-repeat;
background-size : 100%;
height : 100%;
}