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登陆页面的更多相关文章

  1. iOS 本地加载js文件

    #import "RootViewController.h" @interface RootViewController ()<UIWebViewDelegate> @ ...

  2. IOS开发-加载本地音乐

    IOS开发-加载本地音乐 $(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text() ...

  3. iOS WebView 加载本地资源(图片,文件等)

    https://www.cnblogs.com/dhui69/p/5596917.html iOS WebView 加载本地资源(图片,文件等) NSString *path = [[NSBundle ...

  4. ios -网络加载json和本地加载json

    1网络加载json的时候,要在模型的实现文件里写: - (void)setValue:(id)value forKey:(NSString *)key { } 2本地加载json的时候,要在模型的实现 ...

  5. iOS webview加载时序和缓存问题总结

    iOS webView的加载时序 UIWebView加载顺序: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSU ...

  6. iOS网络加载图片缓存策略之ASIDownloadCache缓存优化

    iOS网络加载图片缓存策略之ASIDownloadCache缓存优化   在我们实际工程中,很多情况需要从网络上加载图片,然后将图片在imageview中显示出来,但每次都要从网络上请求,会严重影响用 ...

  7. Android 如何本地加载pdf文件

    大部分app打开pdf文件是通过intent调起手机中能打开pdf文件的工具,来查看pdf文件,如果需求是,用户在app内下载好pdf文件后,不通过第三方的工具,本地打开. 这样的需求要怎么实现呢?上 ...

  8. visual studio 2010 自带reporting报表本地加载的使用

    原文:visual studio 2010 自带reporting报表本地加载的使用 在这家公司时间不长,接触都是之前没玩过的东东,先是工作流引擎和各种邮件短信的审核信息,后又是部署reporting ...

  9. Ionic页面加载前 ionic页面加载完成 ionic页面销毁执行的事件

    ionic 中$ionicView.beforeEnter(页面刚加载前)  $ionicView.afterEnter  (页面加载完成) $destroy(页面销毁) 广播事件 //ionic c ...

随机推荐

  1. shopnc2014年11版数据库字典

    shopnc_activity 表注释: 活动表 字段 类型 空 默认 注释 activity_id mediumint(9) 否   id activity_title varchar(255) 否 ...

  2. jQuery 两种方法实现IE10以下浏览器的placeholder效果

    /* ** jQuery版本:jQuery-1.8.3.min.js ** 测试的浏览器:IE8,IETester下的IE6-IE9** Author:博客园小dee */ placeholder是H ...

  3. RFID读卡器设置卡

    1.打开串口 2.默认密码fffffffffff 3.设置新密码扇区1块号3存放的密码. 4.写入警号001,警号要看数据库是多少

  4. HOSTS文件详解【win|mac】

    hosts文件是一个用于储存计算机网络中各节点信息的计算机文件.这个文件负责将主机名映射到相应的IP地址. hosts文件通常用于补充或取代网络中DNS的功能.和DNS不同的是,计算机的使用者可以直接 ...

  5. C# Unicode编码与解码方法

    public static class ExtentMethod { public static string ToUnicodeString(this string str) { StringBui ...

  6. BLE蓝牙通信指令交互过程配对与绑定

    最简单一次蓝牙通信需要以上相关步骤,包括discovery device,connect,pairing,bond等4个主要部分.BLE中主从机建立连接,到配对和绑定的过程如下图:

  7. 20145319 《java程序设计》课程总结

    20145319 <Java程序设计>课程总结 读书笔记链接总结 - 20145319 第一周学习总结 - 20145319 第二周学习总结 - 20145319 第三周学习总结 - 20 ...

  8. java简单优化和编写规范,自己总结的。

    1.永远不要比较两个浮点数是否相等.它是不安全的.详情google. 2.尽量使用StringBuffer代替String. 3.final类会提高很多效率. 4.try-catch 不应该用来控制程 ...

  9. TestNG学习-001-基础理论知识

    此 文主要讲述用 TestNG 的基础理论知识,TestNG 的特定,编写测试过程三步骤,与 JUnit4+ 的差异,以此使亲对 TestNG 测试框架能够有一个简单的认知. 希望能对初学 TestN ...

  10. Selenium2学习-007-WebUI自动化实战实例-005-解决 Firefox 版本不兼容:org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary

    此文主要讲述 Java 运行 Selenium 脚本时,因 Friefox 浏览器版本与 selenium-server-standalone-x.xx.x.jar 不兼容引起的 org.openqa ...