iMac滚动效果

时间:2015-06-23 17:30:37

标签: jquery html css

我刚刚在codepen http://codepen.io/mariusbalaj/pen/qcfox上看到了这个小提琴,并且非常喜欢这种效果。现在我想用各种不同的图像尺寸重现这个(通用的)。

我没有得到不同宽度和高度之间的关系。也许你们其中一个人可以对此有所了解。

特别是类.mac,高度为613px,宽度为764px,边距为1340px。这如何连接到原始图像大小2548x2052px?

.mac {
  height: 613px;
  width: 764px;
  margin: 1340px auto 100px;
  background: white url("http://i.imgur.com/AyELvGR.jpg") no-repeat 0 0;
  -webkit-background-size: 764px 613px;
  background-size: 764px 613px;
  backface-visibility: hidden;
}

.mac.intro {
  position: fixed;
  width: 2548px;
  z-index:9999;
  height: 2052px;
  -webkit-background-size: 100% auto;
  background-size: 100% auto;
  margin: 0;
  top: 0;
  left: 50%;
  margin-top: -300px;
  margin-left: -1274px;
  -webkit-transform-origin: 50%;
  -ms-transform-origin: 50%;
  transform-origin: 50%;
}

提前致谢

0 个答案:

没有答案
相关问题