iOS 本地加载html登陆页面
Html的代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登陆页面</title>
<link href="CSS/Login.css" rel="stylesheet">
</head>
<body>
<!--最外层-->
<div id="content">
<!--面板-->
<div class="panel">
<!--账号-->
<div class="group">
<label>账号</label>
<input placeholder="请输入账号">
</div>
<!--密码-->
<div class="group">
<label>密码</label>
<input placeholder="请输入密码" type="password">
</div>
<!--登陆-->
<div class="login">
<button>登陆</button>
</div>
</div>
<!--注册-->
<div class="reg">
<button>创建新账号?</button>
</div>
</div>
</body>
</html>
CSS的代码
body{
background-color: #f2f2f2;
}
#content{
margin-top: 100px;
/*background: red;*/
text-align: center;
}
#content .panel{
display: inline-block;
background-color: white;
border: 1px solid #ddd;
border-radius: 5px;
padding: 20px;
}
#content .panel .group{
}
/*s输入框*/
#content .panel .group input{
display: block;
width: 250px;
height: 33px;
padding-left: 7px;
font-size: 15px;
border: 2px solid #ddd;
}
/*伪类*/
#content .panel .group input:focus {
outline: none;
border-color: #CC865E;
}
#content .panel .group label{
display: block;
text-align: left;
height: 30px;
line-height: 30px;
font-size: 20px;
}
#content .login{
margin-top: 20px;
}
/*登陆*/
#content .login button{
width: 250px;
background-color: #CC865E;
}
#content .login button:hover{
background-color: white;
color: #CC865E;
border: 1px solid #CC865E;
cursor: pointer;
}
#content button{
height: 33px;
border: 0px;
color: white;
font-size: 18px;
border-radius: 3px;
}
#content .reg{
margin-top: 20px;
}
/*注册*/
#content .reg button{
width: 250px;
background-color: #466BAF;
}
#content .reg button:hover {
background-color:white;
color: #466BAF;
border: 1px solid #466BAF;
cursor: pointer;
}
iOS 的代码
#import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
#import "AppDelegate.h"
#import "RootViewController.h"
@interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor]; self.window.rootViewController = [[RootViewController alloc] init]; [self.window makeKeyAndVisible];
return YES;
} @end
#import <UIKit/UIKit.h> @interface RootViewController : UIViewController @end
#import "RootViewController.h"
@interface RootViewController ()
@property (nonatomic , strong) UIWebView *webView;
@end
@implementation RootViewController
- (void)viewDidLoad {
[super viewDidLoad];
//html在本地的路径(/Users/apple/WebstormProjects/LoginPage/Login.html)
NSURL *url = [NSURL fileURLWithPath:@"/Users/apple/WebstormProjects/LoginPage/Login.html"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
UIWebView *aWebView = [[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.webView = aWebView;
[self.webView loadRequest:request];
[self.view addSubview:self.webView];
}
@end
iOS 本地加载html登陆页面的更多相关文章
- iOS 本地加载js文件
#import "RootViewController.h" @interface RootViewController ()<UIWebViewDelegate> @ ...
- IOS开发-加载本地音乐
IOS开发-加载本地音乐 $(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text() ...
- iOS WebView 加载本地资源(图片,文件等)
https://www.cnblogs.com/dhui69/p/5596917.html iOS WebView 加载本地资源(图片,文件等) NSString *path = [[NSBundle ...
- ios -网络加载json和本地加载json
1网络加载json的时候,要在模型的实现文件里写: - (void)setValue:(id)value forKey:(NSString *)key { } 2本地加载json的时候,要在模型的实现 ...
- iOS webview加载时序和缓存问题总结
iOS webView的加载时序 UIWebView加载顺序: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSU ...
- iOS网络加载图片缓存策略之ASIDownloadCache缓存优化
iOS网络加载图片缓存策略之ASIDownloadCache缓存优化 在我们实际工程中,很多情况需要从网络上加载图片,然后将图片在imageview中显示出来,但每次都要从网络上请求,会严重影响用 ...
- Android 如何本地加载pdf文件
大部分app打开pdf文件是通过intent调起手机中能打开pdf文件的工具,来查看pdf文件,如果需求是,用户在app内下载好pdf文件后,不通过第三方的工具,本地打开. 这样的需求要怎么实现呢?上 ...
- visual studio 2010 自带reporting报表本地加载的使用
原文:visual studio 2010 自带reporting报表本地加载的使用 在这家公司时间不长,接触都是之前没玩过的东东,先是工作流引擎和各种邮件短信的审核信息,后又是部署reporting ...
- Ionic页面加载前 ionic页面加载完成 ionic页面销毁执行的事件
ionic 中$ionicView.beforeEnter(页面刚加载前) $ionicView.afterEnter (页面加载完成) $destroy(页面销毁) 广播事件 //ionic c ...
随机推荐
- 从个人的角度谈谈本次GNTC大会的收获
GNTC资料:from sdnlab 从个人的角度谈谈本次大会的收获 从本次大会的主题演讲来看,目前SDN.NFV的最前沿已经不再像五年前持观望态度以及探讨,各大运营商.各大厂商已经将SDN.NFV具 ...
- ThinkPHP中Xheditor编辑器报错
在使用Xheditor这个插件时..我按照他里面的domo中的方法放到自己的控制器中..出现如下问题 以下是我节选的错误提示 /index.php/admin/goods/upload/ 上传接口发生 ...
- 动态加载js,css
今天项目中需要用到动态加载 CSS 文件,经过一番折腾终于搞定,回家整理了一下,顺便融合了动态加载 JS 的功能写成了一个对象,先上代码: var dynamicLoading = { css: fu ...
- Manipulating Data Structures
Computer Science An Overview _J. Glenn Brookshear _11th Edition We have seen that the way data struc ...
- reduce()
Professional.JavaScript.for.Web.Developers.3rd.Edition.Jan.2012 var value = [1,2,3,4,5]; var sum = v ...
- poj1979
#include<stdio.h>int map[4][4]={'.','.','.','.', '#','.','.','.', '.','#','.','.', ...
- 【转】下载量最高的 100 个 Laravel 扩展包推荐
说明 Laravel 另一个令人喜欢的地方,是拥有活跃的开发者社区,而活跃的开发者社区带来的,是繁华的扩展包生态. 本文对 Packagist 上打了 Laravel 标签 的扩展包进行整理,截止到现 ...
- 策略模式代替大量的if else
原代码 public class Example { public Double calRecharge(Double charge, RechargeTypeEnum type) { if (typ ...
- jsp页面直接编写csss
<style> .logoZL{ width:550px; float:right; text-align:right; padding-right:15px; margin-right: ...
- java.util.concurrent.CopyOnWriteArrayList
import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; impo ...