Open amenzai opened 5 years ago
add fastclick
<script type="text/javascript" src="lib/js/fastclick.js"></script>
$(function() {
FastClick.attach(document.body);
});
calc and native scroll:
height: calc(~"100% - 44px - 55px");
overflow-y: auto;
/* auto | scroll */
-webkit-overflow-scrolling: touch;
正方形网格类:
.grid--square {
width: 200px;
}
.grid--square .grid__content {
position: relative;
padding-bottom: 100%
}
.grid__inner {
height: 100%;
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center
}
.grid--square .grid__inner {
position: absolute;
top: 50%;
transform: translate3d(0, -50%, 0)
}