framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

Fix for slow android animation (box-shadow issue).

Open softexe opened this issue 10 years ago • 2 comments

Согласно этой статье http://tobiasahlin.com/blog/how-to-animate-box-shadow/ "тормоза" возникают из за использования box-shadow в элементе. Если перенести box-shadow в псевдоэлемент ::after/::before то таких "тормозов" нет.

Проверил это на .modal и .panel-cover фиксами, действительно - явных тормозов не видно Вот код css фиксов, правда у .panel пришлось переопределить свойство overflow: visible возможно это может как то повлиять на отображение?

Далее по идее все использование box-shadow в элементах с анимацией необходимо заменить на использование box-shadow в ::after/::before

/niko/ .modal { box-shadow: none; }

.modal::after { content: ""; border-radius: 5px; position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 100%; box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); }

/niko/ body.with-panel-left-cover .panel, body.with-panel-right-cover .panel { box-shadow: none; overflow: visible; }

body.with-panel-left-cover .panel::after, body.with-panel-right-cover .panel::after { content: ""; position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 100%; box-shadow: 0 0px 20px rgba(0, 0, 0, 0.5); } /niko/ /niko/

softexe avatar May 12 '16 04:05 softexe

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 21 '18 18:06 stale[bot]

Issue is closed because of outdated/irrelevant/not actual

If this issue is still actual and reproducible for latest version of Framework7, please create new issue and fill the issue template correctly:

  • Clearly describe the issue including steps to reproduce when it is a bug.
  • Make sure you fill in the earliest version that you know has the issue.
  • Provide live link or JSFiddle/Codepen or website with issue

nolimits4web avatar Jun 22 '18 10:06 nolimits4web