mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(scroll): ion-scroll
This commit is contained in:
@@ -11,7 +11,7 @@ import {Ion} from '../ion';
|
||||
@View({
|
||||
template: `<div class="scroll-content"><content></content></div>`
|
||||
})
|
||||
export class Content extends Ion{
|
||||
export class Content extends Ion {
|
||||
constructor(elementRef: ElementRef) {
|
||||
super(elementRef);
|
||||
|
||||
|
||||
@@ -11,5 +11,21 @@ $content-background-color: #fff !default;
|
||||
}
|
||||
|
||||
ion-content {
|
||||
position: relative;
|
||||
display: block;
|
||||
flex: 1;
|
||||
background-color: $content-background-color;
|
||||
|
||||
.scroll-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
will-change: scroll-position;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user