Force DOM redraw/refresh on Chrome/Mac

前端 未结 24 1908
轻奢々
轻奢々 2020-11-22 02:11

Every once in a while, Chrome will render perfectly valid HTML/CSS incorrectly or not at all. Digging in through the DOM inspector is often enough to get it to realize the

24条回答
  •  不思量自难忘°
    2020-11-22 02:57

    Below css works for me on IE 11 and Edge, no JS needed. scaleY(1) does the trick here. Seems the simplest solution.

    .box {
        max-height: 360px;
        transition: all 0.3s ease-out;
        transform: scaleY(1);
    }
    .box.collapse {
        max-height: 0;
    }
    

提交回复
热议问题