css horizontal scroll mobile code example
Example 1: css disable scroll mobile
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
}
Example 2: horizontal scroll only css mobile
.images {
display: flex;
align-items:center;
background-color: #eee;
padding: 1rem;
overflow-x: scroll;
}
.images > div {
flex: none;
max-width: 100%;
padding-left: 15px;
padding-right: 15px;
}
.images img {
max-width:100%;
width: 100%;
}
@media (min-width: 960px) {
.images {
overflow-x: visible;
}
.images > div {
flex-basis: 0;
flex-grow: 1;
}
}