首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >无法让我的页面滚动?

无法让我的页面滚动?
EN

Stack Overflow用户
提问于 2018-07-19 03:48:14
回答 1查看 67关注 0票数 0

在我的NativeScript Angular项目中,我的页面根本无法滚动。我对NativeScript非常陌生,所以它可以是简单的东西,但我就是不确定。

下面是我的html:

<ActionBar title="Information" class="action-bar"></ActionBar>
<GridLayout class="pageBackground">
	<ScrollView orientation="vertical">
		<StackLayout class="main-container">
			<TextField style="margin-top: 3%;" class="form-control" hint=" First Name" returnKeyType="Next" autocorrect="false" autocapitalizationType="none"></TextField>
			<TextField class="form-control" hint=" Last Name" returnKeyType="Next" autocorrect="false" autocapitalizationType="none"></TextField>
			<TextField class="form-control" hint=" Password" secure="true" returnKeyType="Next" autocorrect="false" autocapitalizationType="none"></TextField>
			<TextField class="form-control" hint=" Confirm Password" secure="true" returnKeyType="Next" autocorrect="false" autocapitalizationType="none"></TextField>
			<WrapLayout orientation="horizontal" style="width: 90%; height: 7%; margin-bottom: 3%;">
				<Button text="Male" class="genderButtons" style="border-top-left-radius: 5; border-bottom-left-radius: 5;"></Button>
				<Button text="Female" class="genderButtons" style="border-top-right-radius: 5; border-bottom-right-radius: 5;"></Button>
			</WrapLayout>
            <Button [text]="schoolButtonText" style="border-radius: 5; height: 7%; background-color: white; width: 90%; color: rgb(0, 122, 255);" (tap)=selectSchool()></Button>
			<WrapLayout orientation="horizontal" style="margin-left: 5%; width: 95%; margin-top: 3%;">
				<Label text="Basketball" style="color: white; font-size: 18; font-weight: bold; margin-right: 3%; width: 75%"></Label>
				<Switch [checked]="basketballSwitch"></Switch>
			</WrapLayout>
			<WrapLayout orientation="horizontal" style="margin-left: 5%; width: 95%; margin-top: 2%">
				<Label text="Dodgeball" style="color: white; font-size: 18; font-weight: bold; margin-right: 3%; width: 75%"></Label>
				<Switch [checked]="dodgeballSwitch"></Switch>
			</WrapLayout>
			<WrapLayout orientation="horizontal" style="margin-left: 5%; width: 95%; margin-top: 2%">
				<Label text="Football" style="color: white; font-size: 18; font-weight: bold; margin-right: 3%; width: 75%"></Label>
				<Switch [checked]="footballSwitch"></Switch>
			</WrapLayout>
			<WrapLayout orientation="horizontal" style="margin-left: 5%; width: 95%; margin-top: 2%">
				<Label text="Softball" style="color: white; font-size: 18; font-weight: bold; margin-right: 3%; width: 75%"></Label>
				<Switch [checked]="softballSwitch"></Switch>
			</WrapLayout>
			<WrapLayout orientation="horizontal" style="margin-left: 5%; width: 95%; margin-top: 2%">
				<Label text="Soccer" style="color: white; font-size: 18; font-weight: bold; margin-right: 3%; width: 75%"></Label>
				<Switch [checked]="soccerSwitch"></Switch>
			</WrapLayout>
			<WrapLayout orientation="horizontal" style="margin-left: 5%; width: 95%; margin-top: 2%">
				<Label text="Volleyball" style="color: white; font-size: 18; font-weight: bold; margin-right: 3%; width: 75%"></Label>
				<Switch [checked]="volleyballSwitch"></Switch>
			</WrapLayout>
			<Button class="btn btn-primary btn-rounded-sm" style="width: 90%; height: 7%; padding: 0px; background-color: black; color: white; vertical-align: bottom;"
			 text="Finish" (tap)=finishSignUp()></Button>
		</StackLayout>
	</ScrollView>
</GridLayout>

下面是我的css:

.pageBackground{
    background-image: url('https://backgroundtown.com/content/images/thumbs/0002610_classic-texture-dark-cool-gray.jpeg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.main-container{
    height: 100%;
    width: 100%;
}

非常感谢!

css编辑-添加了

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51409957

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档