Css 变换:平移(0,0);不在谷歌Chrome中使用离子浏览器?
我像这样为测试创建HTML文件Css 变换:平移(0,0);不在谷歌Chrome中使用离子浏览器?,css,ionic-framework,ionic,ionic-view,Css,Ionic Framework,Ionic,Ionic View,我像这样为测试创建HTML文件 <html><head> <style> .wrapper{ transform: translate(0,0); } .container{ height: 600px; background-repeat: no-repeat; background-position: center center; background-size: cover; background-atta
<html><head>
<style>
.wrapper{
transform: translate(0,0);
}
.container{
height: 600px;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-attachment: fixed;
}
.container1{
background-image: url(http://www.fillmurray.com/900/600);
}
.container2{
background-color: white;
}
</style></head>
<body>
<div class="wrapper">
<div class="container container1">
</div>
<div class="container container2">
</div>
</div>
</body>
</html>
.包装纸{
变换:平移(0,0);
}
.集装箱{
高度:600px;
背景重复:无重复;
背景位置:中心;
背景尺寸:封面;
背景附件:固定;
}
.集装箱1{
背景图片:url(http://www.fillmurray.com/900/600);
}
.集装箱2{
背景色:白色;
}
我在Google Chrome和Firefox上测试了这段代码。这两种浏览器都能正常工作。(用于图像的固定位置)但我将上面的代码应用于ionic,如下所示
<style>
.wrapper{
transform: translate(0,0);
}
.container{
height: 600px;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-attachment: fixed;
}
.container1{
background-image: url(http://www.fillmurray.com/900/600);
}
.container2{
background-color: white;
}
</style>
<ion-view view-title="Home">
<ion-content overflow-scroll="true">
<div class="wrapper">
<div class="container container1">
</div>
<div class="container container2">
</div>
</div>
</ion-content>
</ion-view>
.包装纸{
变换:平移(0,0);
}
.集装箱{
高度:600px;
背景重复:无重复;
背景位置:中心;
背景尺寸:封面;
背景附件:固定;
}
.集装箱1{
背景图片:url(http://www.fillmurray.com/900/600);
}
.集装箱2{
背景色:白色;
}
第二个代码在Firefox中正常工作,但在Google Chrome中不正常(图像不像第一个代码那样固定位置)。谢谢您的帮助。您试用了哪个版本的Chrome?一些早期版本的Chrome需要
-webkit
前缀<代码>网络工具包转换。。我使用Chrome版本46.0.2490.80@JonathanMarzullo