uniapp簡單的登錄頁面布局


<template>
	<view class="login">
		<view class="content-wrapper">
			<view class="title">
				<h1>歡迎使用考試系統</h1>
			</view>
			<view class="login-form">
				<view class="login-form-items">
					<view class="login-form-items-title">手機號</view>
					<input type="text" class="login-input" placeholder="手機號" />
				</view>

				<view class="login-form-items">
					<view class="login-form-items-title">登錄密碼</view>
					<input type="password" class="login-input" placeholder="請輸入登錄密碼" />
				</view>

				<view class="login-form-items">
					<view class="login-form-items-title">驗證碼</view>
					<input type="text" class="login-input" placeholder="請輸入驗證碼" />
					<view class="captcha-wrapper">
						<img src="../../static/captcha.jpg"></img>
					</view>
				</view>
			</view>
		</view>
		<div class="submit-wrapper">
			<button type="primary" class="login-btn">登錄</button>
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	page {
		background: #F4F5F6;
	}

	.login {
		.content-wrapper {
			width: 100%;

			.title {
				margin-top: 35rpx;
				width: 100%;
				margin-bottom: 10px;

				h1 {
					border: 0px;
					width: 50%;
					margin: 0 auto;
					text-align: center;
					border-bottom: 1px solid #E3E3E3;
					height: 50px;
					line-height: 50px;
					font-size: 17px;
					overflow: hidden;
					font-weight: 400;
				}
			}

			.login-form {
				margin: 20px 10px 20px 15px;
				background: #FFFFFF;

				.login-form-items {
					padding: 15px 10px;
					border-bottom: 1px solid #F3F4F5;
					position: relative;
					display: -webkit-flex;
					display: flex;

					.login-form-items-title {
						width: 30%;
						line-height: 22px;
						height: 22px;
						flex-shrink: 0;
					}

					.login-input {
						width: 100%
					}

					img {
						width: auto;
						height: auto;
						max-width: 100%;
						max-height: 100%;
					}
				}
			}
		}

		.submit-wrapper {
			padding: 10px;
			padding-top: 10px;
		}

	}
</style>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM