html horizontal scroll code example
Example 1: tablayout horizontal scroll
In Java:
tabLayout.setTabMode(MODE_SCROLLABLE) // Default is MODE_FIXED
In XML:
app:tabMode="scrollable"
Example 2: horizontal scroll html
.scrolling-wrapper {
overflow-x: scroll;
overflow-y: hidden;
white-space: nowrap;
.card {
display: inline-block;
}
}
Example 3: css horizontal scroll
.scroll{
overflow-x: scroll;
overflow-y: hidden;
height: 80px;
white-space:nowrap
}
Example 4: horizontal scroll
.scrolling-wrapper-flexbox { display: flex; flex-wrap: nowrap; overflow-x: auto; .card { flex: 0 0 auto; }}