Html 如何在Magento中调整视差图像和静态块?
大家好,我叫克里斯,这里有点麻烦。我似乎找不到解决这个问题的方法,所以我想我会去问问这里。截图1是我为这家公司创建的Wix网站模板的一部分。他们喜欢这个设计和一切。因此,现在我必须尽可能多地实现Magento中的代码(正如您可能想到的,这是关于Magento 1.9中的一个webshop)。 在屏幕截图2上,我现在可以制作thill。我想做的是,当我将width属性设置为lefty时,我希望图像在侧面移动,就像你在wix网站上看到的那样Html 如何在Magento中调整视差图像和静态块?,html,css,magento,Html,Css,Magento,大家好,我叫克里斯,这里有点麻烦。我似乎找不到解决这个问题的方法,所以我想我会去问问这里。截图1是我为这家公司创建的Wix网站模板的一部分。他们喜欢这个设计和一切。因此,现在我必须尽可能多地实现Magento中的代码(正如您可能想到的,这是关于Magento 1.9中的一个webshop)。 在屏幕截图2上,我现在可以制作thill。我想做的是,当我将width属性设置为lefty时,我希望图像在侧面移动,就像你在wix网站上看到的那样 <div class="parallaxbox"&g
<div class="parallaxbox">
<div class="lefty"></div>
<div class="parallax"></div>
</div>
只是一个更新,我有点做了。它工作正常我用以下代码修复了它:
.parallax{
/* The image used */
background-image: url("/skin/frontend/WideScreen/default/images/parallax1.png");
/* Set a specific height */
min-height:600px;
width: 100%;
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: 100%;
background-repeat: no-repeat;
background-size: contain;}
.lefty{
float: left;
width: 32.8em;
height: 600px;
background-color: lightblue;}
.parallaxbox{
width: 143em;}
现在我的另一个问题是,如何设置图片的默认分辨率,以便在更改屏幕时,人物的缩放保持不变P
.parallax{
/* The image used */
background-image: url("/skin/frontend/WideScreen/default/images/parallax1.png");
/* Set a specific height */
min-height:600px;
width: 100%;
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: 100%;
background-repeat: no-repeat;
background-size: contain;}
.lefty{
float: left;
width: 32.8em;
height: 600px;
background-color: lightblue;}
.parallaxbox{
width: 143em;}