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 ...
随机推荐
- Apache Spark源码走读之17 -- 如何进行代码跟读
欢迎转载,转载请注明出处,徽沪一郎 概要 今天不谈Spark中什么复杂的技术实现,只稍为聊聊如何进行代码跟读.众所周知,Spark使用scala进行开发,由于scala有众多的语法糖,很多时候代码跟着 ...
- Frenetic Python实验(三)
实验5 repeater 这个实验在HelloSDNWorld里面做的实验是一样的.HelloSDNWorld 目的:模拟一个有多个端口的中继器. This application implement ...
- 我的Ubuntu系统配置所作的备份记录如下
Ubuntu无法关机解决办法 说明:如果不成功请参考一下文章最后的内容,也许会有帮助. 其实不止在ubuntu里面,fedora里面我也遇到了这个问题,就是电脑可以重启,但是不能直接关机,否则就一直停 ...
- tomcat启动报错:IOException while loading persisted sessions: java.io.EOFException.
tomcat启动错误代码: 严重: IOException while loading persisted sessions: java.io.EOFException java.io.EOFExce ...
- 用正则表达式替换html标签
下面的代码用于修改html文本中的img标记,修改后的html适用于lazyload方式的图片加载: protected string LazyPicProcess(string content) { ...
- Advanced Packaging Tool
https://en.wikipedia.org/wiki/Advanced_Packaging_Tool Eventually, a new team picked up the project, ...
- 64 位win 7或windows 8下的visual studio不能连接Oracle数据库调试网站的问题
在64 位win 7或windows 8系统下,visual studio直接F5运行网站调试,你会发现不能连接Oracle数据库,会报一个“ORA-06413: Connection not ope ...
- pylint window下安装与使用
简介 Pylint 是一个 Python 代码分析工具,它分析 Python 代码中的错误,查找不符合代码风格标准(Pylint 默认使用的代码风格是 PEP 8)和有潜在问题的代码. Pylint ...
- js判断url是否有效
方法一:(仅适用于ie) function CheckStatus(url) { XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP") ...
- 【C51】单片机独立按键与矩阵按键
独立按键 首先既然是检测输入,对于当然要用到拉电阻,来检测引脚电平变化变化.51单片机中,除了P0口外,P2,P3,P4都是内置上拉电阻的准双向IO口,一般 的 51 P0引脚都外接了上拉电阻,当然也 ...