Collapse/expand GPU CSS3 smooth transition | بلاگ

Collapse/expand GPU CSS3 smooth transition

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

.from{
  width: 200px;
  height: 300px;

}
.img{
  height: 100%;
  background-image: url(https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Cat_eye_on_you.jpg/1024px-Cat_eye_on_you.jpg);
  background-size: 600px;
  background-position: center;
}
.to{
  width: 400px;
  height: 300px;
}

  

jsbin

I need to expand the element with "from" class to element with "to" class

I try to make this transition but only using the gpu (transitions) because width transition is very expensive

I tried use scale but affect the background size

Any advice?

Thanks

asked 3 mins ago
Omar

...
نویسنده : استخدام کار بازدید : 8 تاريخ : شنبه 25 فروردين 1397 ساعت: 8:41