Nginx单IP地址配置多个SSL证书

默认情况下,Nginx一个IP地址仅支持一个SSL证书,需要多个IP地址才能配置多个SSL证书,在公网IP地址有限的情况下,可以使用TLS Server Name Indication extension(SNI, RFC 6066),它允许浏览器在SSL握手的时候发送请求的server name,也就是 Host,这样 Nginx 就能找到对应server 的SSL配置。 配置步骤如下: 1、检查Nginx是否支持TLS nginx -V … TLS SNI support enabled … nginx -V … TLS SNI support enabled … 2、如果出现TLS SNI support disable,就得升级openssl版本,并且重新编译nginx。 具体步骤如下: 首先下载openssl(建议下载1.0.1h版本) #wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz 下载Nginx #wget http://nginx.org/download/nginx-1.9.9.tar.gz 解压openssl #tar -zxvf openssl-1.0.1h.tar.gz 解压nginx,并编译 #tar -zxvf nginx-1.9.9.tar.gz #cd nginx-1.9.9 #make && make install #检查Nginx版本信息 #/usr/local/nginx/sbin/nginx -V nginx version: nginx/1.9.9 built by gcc 4.1.2 20080704 (Red Hat 4.1.2-55) built with OpenSSL 1.0.1h 5 Jun 2014 TLS SNI support enabled ...

2017年1月11日 · 1 分钟 · 天边的星星

WebSocket的C++服务器端实现

由于需要在项目中增加Websocket协议,与客户端进行通信,不想使用开源的库,比如WebSocketPP,就自己根据WebSocket协议实现一套函数,完全使用C++实现。 代码已经实现,放在个人github上面,地址:https://github.com/jice1001/websocket.git。下面进行解释说明: 一、原理 Websocket协议解析,已经在前面博客里面详细讲解过,可以参考博客http://www.cnblogs.com/jice1990/p/5435419.html,这里就不详细细说。 服务器端实现就是使用TCP协议,使用传统的socket流程进行绑定监听,使用epoll控制多路并发,收到Websocket握手包时候进行握手处理,握手成功便可进行数据收发。 二、实现 1、服务器监听 该部分使用的是TCP socket流程,首先是通过socket函数建立socket,通过bind函数绑定到某个端口,本例使用的是9000,然后通过listen函数开启监听,代码如下: ![复制代码](http://common.cnblogs.com/images/copycode.gif) listenfd_ = socket(AF_INET, SOCK_STREAM, 0); if(listenfd_ == -1){ DEBUG_LOG("创建套接字失败!"); return -1; } struct sockaddr_in server_addr; memset(&server_addr, 0, sizeof(sockaddr_in)); server_addr.sin_family = AF_INET; server_addr.sin_addr.s_addr = htonl(INADDR_ANY); server_addr.sin_port = htons(PORT); if(-1 == bind(listenfd_, (struct sockaddr *)(&server_addr), sizeof(server_addr))){ DEBUG_LOG("绑定套接字失败!"); return -1; } if(-1 == listen(listenfd_, 5)){ DEBUG_LOG("监听失败!"); return -1; } ![复制代码](http://common.cnblogs.com/images/copycode.gif) 2、epoll控制多路并发 ...

2016年9月11日 · 4 分钟 · 天边的星星

linux shell中 if else以及大于、小于、等于逻辑表达式介绍

比如比较字符串、判断文件是否存在及是否可读等,通常用”[]”来表示条件测试。 注意:这里的空格很重要。要确保方括号的空格。笔者就曾因为空格缺少或位置不对,而浪费好多宝贵的时间。 if ….; then …. elif ….; then …. else …. fi [ -f “somefile” ] :判断是否是一个文件 [ -x “/bin/ls” ] :判断/bin/ls是否存在并有可执行权限 [ -n “var” ] :判断var变量是否有值 [ “a” = “b” ] :判断a和b是否相等 -r file 用户可读为真 -w file 用户可写为真 -x file 用户可执行为真 -f file 文件为正规文件为真 -d file 文件为目录为真 -c file 文件为字符特殊文件为真 -b file 文件为块特殊文件为真 -s file 文件大小非0时为真 -t file 当文件描述符(默认为1)指定的设备为终端时为真 ** 字符串判断** str1 = str2 当两个串有相同内容、长度时为真 str1 != str2 当串str1和str2不等时为真 -n str1 当串的长度大于0时为真(串非空) -z str1 当串的长度为0时为真(空串) str1 当串str1为非空时为真 ...

2016年9月5日 · 7 分钟 · 天边的星星

推荐!国外程序员整理的Java资源大全

构建 这里搜集了用来构建应用程序的工具。 Apache Maven:Maven使用声明进行构建并进行依赖管理,偏向于使用约定而不是配置进行构建。Maven优于Apache Ant。后者采用了一种过程化的方式进行配置,所以维护起来相当困难。 Gradle:Gradle采用增量构建。Gradle通过Groovy编程而不是传统的XML声明进行配置。Gradle可以很好地配合Maven进行依赖管理,并且把Ant脚本当作头等公民。 字节码操作 编程操作Java字节码的函数库。 ASM:通用底层字节码操作及分析。 Javassist:尝试简化字节码编辑。 Byte Buddy:使用“流式API”进一步简化字节码生成。 代码分析 软件度量和质量评估工具。 Checkstyle:对编程规范和标准进行静态分析。 FindBugs:通过字节码静态分析找出潜在Bug。 PMD:对源代码中不良编程习惯进行分析。 SonarQube:通过插件集成其它分析组件,提供评估最终结果报告。 编译器 创建分析器、解释器和编译器的框架。 ANTLR:功能完备的自顶向下分析复杂框架。 JavaCC:相对ANTLR更具体,上手略为简单。支持语法语法超前预测(syntactic lookahead)。 持续集成 支持持续集成、测试和应用发布的工具。 Bamboo:Atlassian的持续集成(CI)解决方案,包含很多其它产品。 CircleCI:提供托管服务,可免费试用。 Codeship:提供托管服务,提供有限免费计划。 Go:ThoughtWork开源持续集成解决方案。 Jenkins:提供基于服务器的部署服务。 TeamCity:JetBrain持续集成方案,提供免费版。 Travis:提供托管服务,常用于开源项目。 数据库 简化数据库交互的工具、库。 Flyway:使用Java API轻松完成数据库迁移。 H2:小型SQL数据库,以内存操作著称。 JDBI:便捷的JDBC抽象。 jOOQ:基于SQL schema生成类型安全代码。 Presto:针对大数据的分布式SQL查询引擎。 Querydsl:针对Java的类型安全统一查询。 日期和时间 处理日期和时间的函数库。 Joda-Time:Java 8出现之前,它是日期、时间处理的标准函数库。 Time4J:Java高级日期、时间函数库。 依赖注入 帮助代码实现控制反转模式的函数库。 Dagger :编译期的注入框架,没有使用反射,主要用于Android开发。 Guice:轻量级注入框架,功能强大可与Dagger媲美。 开发库 从基础层次上改进开发流程。 AspectJ:面向切面编程扩展,与程序无缝连接。 Auto:源代码生成器集合。 DCEVM:通过修改JVM,在运行时可无限次重定义已加载的类。OpenJDK 7、8已提供支持,详情可查看这个分支(fork)。 JRebel:商用软件,无需重新部署可即时重新加载代码及配置。 Lombok:代码生成器,旨在减少Java冗余代码。 RxJava:使用JVM中可观察序列,创建异步、基于事件应用程序的函数库。 Spring Loaded:另一个JVM类重载代理。 vert.x:JVM多语言事件驱动应用框架。 分布式应用 用来开发分布式、具有容错性应用程序的函数库和框架。 Akka:构建并发、分布式和具有容错功能的事件驱动应用程序所需的工具包和运行时。 Apache Storm:分布式实时计算系统。 Apache ZooKeeper:为大型分布式系统,使用分布式配置、同步和命名注册提供协调服务。 Hazelcast:分布式、高可扩展性内存网格。 Hystrix:为分布式系统提供延迟和容错处理。 JGroups:一组提供可靠消息传输的工具包,可用来创建集群。集群中的节点可互相发送消息。 Quasar:为JVM提供轻量级线程和Actor。 发布 使用本机格式分发Java应用程序的工具。 ...

2016年8月18日 · 3 分钟 · 天边的星星

charles工具抓包教程(http跟https)

1.下载charles 可以去charles官网下载,下载地址:http://www.charlesproxy.com/download/ 根据自己的操作系统下载对应的版本,然后进行安装,然后打开charles工具 2.设置代理(记住手机跟电脑要在同一个网络,用的同一个路由器) 1).查看默认端口 Proxy->Proxy Settings 在这个页面会看到HTTP Proxy的默认端口是8888 我们不需要修改,只需要知道有这个值就行 2).查看当前电脑的ip 例如我这里的是:192.168.9.129 3).知道了默认端口跟ip地址,我们就可以手机上设置代理了。设置步骤我录制了gif动画。(我用的是genymotion模拟器,真机也是一样的) 完成了以上两个步骤就可以抓到http请求的数据了,效果图如下: 接下来讲解如何抓取https协议的包,如果你没有这个需求,请不要继续浏览下面的内容 3.设置charles ssl代理 Proxy->SSL Proxy Settings 弹出一个ssl代理设置界面 1).Enable SSL Proxying复选框打上勾 2).添加你想要的设置代理的域名,端口默认443 设置过后效果图如下: 4.手机下载ssl证书 1).Help->SSL Proxying ->Install Charles Root Certificate on a Mobile Device or Remote Browser… 会弹出一个提示框,如下显示: 浏览器输入这个地址即可下载证书,记住要用Android自带的浏览器. 地址是:http://charlesproxy.com/getssl 扫一扫二维码安装ssl 2).然后按照他的提示安装证书即可. 做完第三步跟第四步就可以抓包https数据了.如果还有问题请留言。。。下面是我抓包截图。 方法二 HTTP包: 1.安装抓包工具 Charles , 到官网http://www.charlesproxy.com/可下载到最新版本 2.用安装了charles的电脑,代理待抓包anroid手机的网络连接: 首先查看pc的网络IP地址;打开手机设置,进入当前wifi连接,设置代理为手动,将服务器填为上一步中获得的IP,端口默认为8888(在charles的proxy setting中可以改这个端口号)。这时Charles弹出确认框,点击Allow按钮即可 3.中文乱码问题解决 在charles的content/info.plist 中 的vmoption 添加-Dfile.encoding=UTF-8 HTTPS抓包: 下载Charles证书http://www.charlesproxy.com/ssl.zip,解压后导入到手机中,然后设置->安全->凭据存储->从存储设备安装,选中证书。 在Charles的工具栏上点击设置按钮,选择Proxy Settings;切换到SSL选项卡,选中Enable SSL Proxying,选项卡的Locations表单可以填写要抓包的域名和端口,点击Add按钮,在弹出的表单中Host填写域名,比如填api.instagram.com,Port填443。默认的..表示应用于所有地址

2016年7月19日 · 1 分钟 · 天边的星星

深度揭秘阿里移动端高性能动态化方案Weex

2016年Qcon大会首日,阿里巴巴资深总监、淘宝移动平台、阿里百川负责人庄卓然宣布移动端高性能动态化方案Weex即时内测,并将于6月开源。此消息一出,群情汹涌,在座的程序猿、攻城狮们纷纷拿起手机扫码,以期第一时间感受Weex的神奇之力。 在第二天的主题分享会上,阿里巴巴前端开发专家赵锦江和技术专家徐凯对Weex进行了深入的解析。以下为演讲速记整理后的成文。 阿里怎么看待移动开发? 目前的移动开发者面临的最大痛点就是面对极其复杂的环境,对此,庄卓然给出一个公式,移动开发的复杂度=应用数量×平台数量×要适配的各种各样的机型。 如何解决这个问题呢?在解决问题之前,首先要对移动开发的未来有着精准的研判。 阿里认为,移动开发的未来必定更加平衡,也就是说必须是性能与动态兼得,如此,才能够满足未来用户的需求。另外,移动开发在未来也必定是开放互联的状态,移动互联网将来肯定是基于更加大众化的技术体系,没有平台之间的隔阂,而且简单易用。 所以,阿里结合移动开发的现状并围绕其愿景推出了Weex解决方案。 事实上,在去年的双11活动中,Weex就得到了实战的验证,且表现不俗。时至今日,Weex已经被阿里技术团队多次运用,并“创造”出各种丰富的场景,整体的表现非常优异。 把移动端所有界面拆分成各个page,然后中间设置有路由的控制逻辑,同时,将移动端各种各样的能力通过各种API提供给开发者。这是阿里对移动开发模型的理解。 Weex通过标准化的东西,包括HTML、CSS和JS这些前端非常快速易用好学的语法作为开发体验,提供给开发者。另外,Weex的语法设计尊重还Web的标准。 Weex的工作原理 Weex设计之初就考虑到在三端(iOS、安卓和H5)上能够得到展现。在最上面的DSL,阿里一般称之为Weex文件(.we),通过Transformer转换成js-bundle,再部署到服务器,这样服务端就完成了。在客户端,第一层是JS-Framework,最后到RenderRengine。 输入是Virtual DOM输出是native或者H5 view,还原成内存中的树型数据结构,再创建view,把事件绑定在view上,把view基本属性设上去。Weex Render会分三个线程,不同的线程负责不同的事情,让JS线程优先保障流畅性。 Weex的性能、扩展性以及可用性究竟怎样呢? 性能方面,阿里对Weex做了多次压测。在加载时间、帧率、内存消耗、CPU占用(包括静默和峰值)等多个方面,Weex都表现得非常出色。 在谈及性能之时,帧率和加载时间几乎都会被提及,但是往往忽略了一个事实,那就是Native UI开发中通常没有JS资源在服务器端加载。Weex会把JS内置到客户端里,以免除下载的问题,从而更为有效地提升性能。 兼容性是Weex非常重视的问题,对此,阿里是这样来解决的。 首先是单测保证,包括JS和H5的单测,保证最基础的UT(Unit Test)本身所带来的含义。 其次是UI的自动化,分为两个部分,一是截图对比,将最终产生的结果和意料中的结果进行图形对比;二是Layout Results,包括Model以及其他的布局类的,通过基本的信息完成测试的过程。 在扩展性方面,Weex可以写很多页面,而且通过路由机制帮助开发者将页面进行串联。 Weex已开放内测,可用性方面正在逐步完善。包括Playground、调试工具、脚手架、AppHub、编辑器等多个方面,一些工作已经完成就绪,绝大部分工作将在5、6月份完成。 最后,是Weex的三种工作模式。 1. 全页模式 目前支持单页使用或整个App使用Weex开发(还不完善,需要开发Router和生命周期管理),这是主推的模式,可以类比RN。 2. Native Component模式 把Weex当作一个iOS/Android组件来使用,类比ImageView。这类需求遍布手淘主链路,如首页、主搜结果、交易组件化等,这类Native页面主体已经很稳定,但是局部动态化需求旺盛导致频繁发版,解决这类问题也是Weex的重点。 3. H5 Component模式 在H5种使用Weex,类比WVC。一些较复杂或特殊的H5页面短期内无法完全转为Weex全页模式(或RN),比如互动类页面、一些复杂频道页等。这个痛点的解决办法是:在现有的H5页面上做微调,引入Native解决长列表内存暴增、滚动不流畅、动画/手势体验差等问题。 另外,WVC将会融入到Weex中,成为Weex的H5 Components模式。 转自:http://mp.weixin.qq.com/s?__biz=MzA4MjA0MTc4NQ==&mid=504089602&idx=1&sn=7ad9a1820baa153a8dc051e9c4f16d25#rd

2016年5月4日 · 1 分钟 · 天边的星星

centos7下使用yum安装mysql

CentOS7的yum源中默认好像是没有mysql的。为了解决这个问题,我们要先下载mysql的repo源。 1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-community-release-el7-5.noarch.rpm包 $ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm 安装这个包后,会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。 3. 安装mysql $ sudo yum install mysql-server 根据步骤安装就可以了,不过安装完成后,没有密码,需要重置密码。 4. 重置密码 重置密码前,首先要登录 $ mysql -u root 登录时有可能报这样的错:ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2),原因是/var/lib/mysql的访问权限问题。下面的命令把/var/lib/mysql的拥有者改为当前用户: $ sudo chown -R openscanner:openscanner /var/lib/mysql 然后,重启服务: $ service mysqld restart 接下来登录重置密码: $ mysql -u root mysql > use mysql; mysql > update user set password=password(‘123456‘) where user=‘root‘; mysql > exit; 5. 开放3306端口 ...

2016年2月29日 · 1 分钟 · 天边的星星

mysql计算经纬度距离

mysql中计算经纬度方法 select * ,3956*2*asin(sqrt(power(sin((122.4058-abs(dest.lat))*pi()/180/2),2)+cos(122.4058/180)*cos(abs(dest.lat)*pi()/180)*power(sin((37.7907-dest.lon)*pi()/180/2),2))) as distance from sp_zxcplace dest HAVING distance<10000 order by distance Mysql根据经纬度算距离返回米 亲测ok SELECT pId,name,lon,lat, ROUND(6378.138*2*ASIN(SQRT(POW(SIN((34.3574030000*PI()/180-lat*PI()/180)/2),2)+COS(34.3574030000*PI()/180)*COS(lat*PI()/180)*POW(SIN((108.9263460000*PI()/180-lon*PI()/180)/2),2)))*1000) AS distance FROM sp_zxcplace HAVING distance<10000 ORDER BY distance

2015年1月2日 · 1 分钟 · 天边的星星

《构建跨平台APP:jQuery Mobile移动应用实战》连载六-设计播放器APP

前几节的例子已经介绍了一些按钮控件的用法,但是笔者的同事一致反映,在jQuery Mobile中按钮只能以占满一行的形式平铺显得过于单调,正巧笔者在贴吧看到了一个学生设计的简单播放器(如图6-13),于是产生了灵感,决定用一组内联的按钮来实现一个简单播放器的控制面板。 图 6-13 简单的音乐播放器 要实现的功能很简单,就是选取页面中的一行,使其中并排放置4个大小相同的按钮,分别显示为播放、停止、前进和后退,可是这真的能实现嘛? 也许有读者会说,可以重新设计按钮的样式文件对其CSS进行重写,这当然是一种非常直接的方法,但是实在是过于麻烦了。因为jQuery Mobile已经为开发者准备了按钮的内联功能可以方便的实现笔者想要的效果。 【范例6-5 利用按钮分组制作的播放器界面】 **[html]** [view plain](http://blog.csdn.net/bookzhaopin/article/details/38270351#)[copy](http://blog.csdn.net/bookzhaopin/article/details/38270351#) <div> </div> </div> - <span style="color: black;"><!DOCTYPE html<span class="tag" style="font-weight: bold; color: #993300;">></span> <span class="comments" style="color: #008200;"><!&#8211;声明HTML 5 &#8211;></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">html</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">head</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">meta</span> <span class="attribute" style="color: red;">http-equiv</span>=<span class="attribute-value" style="color: blue;">&#8220;Content-Type&#8221;</span> <span class="attribute" style="color: red;">content</span>=<span class="attribute-value" style="color: blue;">&#8220;text/html; charset=utf-8&#8221;</span> <span class="tag" style="font-weight: bold; color: #993300;">/></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">title</span><span class="tag" style="font-weight: bold; color: #993300;">></span>简单的播放器<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">title</span><span class="tag" style="font-weight: bold; color: #993300;">></span> <span class="comments" style="color: #008200;"><!&#8211;页面标题&#8211;></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">meta</span> <span class="attribute" style="color: red;">name</span>=<span class="attribute-value" style="color: blue;">&#8220;viewport&#8221;</span> <span class="attribute" style="color: red;">content</span>=<span class="attribute-value" style="color: blue;">&#8220;width=device-width, initial-scale=1&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><!&#8211;引入jQuery Mobile样式文件 </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">link</span> <span class="attribute" style="color: red;">rel</span>=<span class="attribute-value" style="color: blue;">&#8220;stylesheet&#8221;</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;jquery.mobile.min.css&#8221;</span> <span class="tag" style="font-weight: bold; color: #993300;">/></span> </span> - <span style="color: black;"><!&#8211;引入jQuery支持库 </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">script</span> <span class="attribute" style="color: red;">src</span>=<span class="attribute-value" style="color: blue;">&#8220;jquery-1.7.1.min.js&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span><span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">script</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><!&#8211;引入jQuery Mobile所需的js文件 </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">script</span> <span class="attribute" style="color: red;">src</span>=“jquery.mobile.min.js”<span class="tag" style="font-weight: bold; color: #993300;">></span><span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">script</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">head</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">body</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;page&#8221;</span> <span class="attribute" style="color: red;">data-theme</span>=<span class="attribute-value" style="color: blue;">&#8220;a&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;header&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>返回<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">h1</span><span class="tag" style="font-weight: bold; color: #993300;">></span>音乐播放器<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">h1</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;content&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;controlgroup&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>no air <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="comments" style="color: #008200;"><!&#8211;网上随意下载的图片,将图片宽度设置为80%使两边留有空隙&#8211;></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">img</span> <span class="attribute" style="color: red;">src</span>=<span class="attribute-value" style="color: blue;">&#8220;1.jpg&#8221;</span> <span class="attribute" style="color: red;">style</span>=<span class="attribute-value" style="color: blue;">&#8220;width:80%;&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">/></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="comments" style="color: #008200;"><!&#8211;这里歌手和来源占用两格可以使页面更加和谐&#8211;></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>jordin sparks<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>No Air <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;controlgroup&#8221;</span> <span class="attribute" style="color: red;">data-type</span>=<span class="attribute-value" style="color: blue;">&#8220;horizontal&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>后退<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>播放<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>暂停<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span> <span class="attribute" style="color: red;">href</span>=<span class="attribute-value" style="color: blue;">&#8220;#&#8221;</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;button&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span>后退<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">a</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span> <span class="attribute" style="color: red;">data-role</span>=<span class="attribute-value" style="color: blue;">&#8220;footer&#8221;</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"><</span><span class="tag-name" style="font-weight: bold; color: #993300;">h1</span><span class="tag" style="font-weight: bold; color: #993300;">></span>暂无歌词<span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">h1</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"> <span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">div</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">body</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> - <span style="color: black;"><span class="tag" style="font-weight: bold; color: #993300;"></</span><span class="tag-name" style="font-weight: bold; color: #993300;">html</span><span class="tag" style="font-weight: bold; color: #993300;">></span> </span> ...

2014年11月24日 · 7 分钟 · 天边的星星

20款优秀的移动产品原型和线框图设计工具

 线框图(Wireframe)是app、软件或者网站设计过程中非常重要的一个环节,它可以合理地组织并简化内容和元素。线框图除了可以帮助开发者 节省时间外,更可以加深开发者对产品的认知,给开发者一个清晰的产品构架,避免了开发者陷入层次不清、功能不明的产品设计和开发混乱状态。 1、Proto.io ![](http://www.cocoachina.com/cms/uploads/allimg/130408/4196_130408122208_1.jpg) Proto.io是一个专用的手机原型开发平台——可以构建和部署全交互式的移动程序的原型,并且可以模拟出相似的成品。它可以运行在大多数的浏览器中,并提供了3个重要的接口:dashboard、编辑器以及播放器。 dashboard可以用来管理项目。编辑器是构建原型的环境,由一组设计和开发原型的工具组成,另外还可以构建交互。播放器用来观看原型,并与原 型进行交互,并提供了相关工具来标注和保留反馈信息。你可以直接在真实的移动设备上对原型进行测试。并且可以使用iOS或Android上的浏览器以全屏 模式运行原型。 2、Moqups ![](http://www.cocoachina.com/cms/uploads/allimg/130408/4196_130408122247_1.jpg) 是一个非常好的、免费的HTML5应用,通过它可以创建可爱朴素的线框图、实体模型和UI概念。该程序使用起来非常简单,并且有内置的模板可以直接使用(模板包括单选按钮、链接、图像占位符、文本框以及滑块等)。 它还提供了iPhone和iPad模板,以及iOS相关的按钮、提示框、picker、菜单、开关以及键盘等。你可以设置网格的尺寸,并预览和分享你的线框图。Moqups提供了一个很有用的功能就是对齐网格,可以使对象精准对齐。 3、UXPin ![](http://www.cocoachina.com/cms/uploads/allimg/130408/4196_130408122340_1.jpg) UXPin是DeSmart团队开发的一个简易快速的实体模型和在线可点击原型创作工具。它基于优秀的用户体验设计原则,在构建原型中,它提供了一个完整的工具包(该工具包具有良好的用户设计模式和元素)来从头构建一个出色的原型。 UXPin具有响应式的断点功能,创建的响应式原型和线框图可以运行在不同的设备和分辨率上。另外该软件还提供了版本控制和迭代功能,可以轻松的共 享预览,直观的注解和实时的协同编辑和聊天。该软件拥有大量具有吸引力的用户界面元素风格(包括web,iOS,Android等),并且具有快速、灵敏 的响应拖放接口。 4、Balsamiq Mockups ![](http://www.cocoachina.com/cms/uploads/allimg/130408/4196_130408122443_1.jpg) Balsamiq Mockups是一款非常使用起来非常方便、非常高效的原型设计软件。 Balsamiq Mockups目前包括75个界面控件和187个漂亮的icon,基本上自带了常用的小控件,UI控件支持自动拖拽,并且可以实现自动对齐。还有不少随即 可用的元素,简单拖拽就能形成效果图。 Mockups To Go library中还有适合Android、Blackberry以及iOS开发者的模版,Windows、Mac OS、Linux下都可以使用。可使用XML语言保存元素,也可以导出PNG图片,可以插入到任何项目。 Balsamiq Mockups再现在白板上绘制草图的体验,共享原型进行测试有助于合作与反馈。整体采用了手绘风格,Balsamiq Mockups还提供了一个将图片转换成手绘风格的选项,保持了整体风格的一致。 5、JustinMind ![](http://www.cocoachina.com/cms/uploads/allimg/130408/4196_130408122538_1.jpg) JustinMind是由西班牙JustinMind公司出品的原型制作工具,可以输出Html页面。与目前主流的交互设计工具axure,Balsamiq Mockups等相比,Justinmind Prototyper更为专属于设计移动终端上app应用。 JustinMind可以帮助开发者设计更丰富、更具交互新的移动产品线框图,包含了iPhone、Android 以及iPad常用手势,滑动、缩放、旋转,甚至捕捉设备方向等,从而创造出更具交互性的原型。另外,它可以导出原型信息到Microsoft Word,生成规范的文档。 此外,你还可以自定义小组件,创建自定义组件库,并进行分类,不管对象是iPhone、iPad、黑莓、Android还是其他。 6、FluidUI ![](http://www.cocoachina.com/cms/uploads/allimg/130408/4196_130408122635_1.jpg) Fluid UI是一款用于移动开发的Web原型设计工具,可以帮助设计师高效地完成产品原型设计。Fluid UI 内置超过1700款的线框图和手机UI控件,并且还会经常进行更新。 Fluid UI无设备限制,无平台限制(Windows、Mac以及Linux系统),支持Chrome和Safari浏览器(Chrome浏览器上的app也可离 线使用)。你可以使用Fluid Player来预览你的设计,收集意见和反馈。还可以以PNG、PDF方式输出。 Fluid UI使用方法简单,采取拖拽的操作方式,不需要程序员来写代码。另外,Fluid UI资源库非常丰富,有针对iOS、Android以及Windows 8的资源。如果你觉得库存资源不能满足你的需求,你也可以自行添加。 7、Axure ![](http://www.cocoachina.com/cms/uploads/allimg/130408/4196_130408122811_1.jpg) ** ** 不多说了,很多人都在用这个交互原型设计软件。网上也有很多这方面的教程和文档。 ...

2014年11月22日 · 1 分钟 · 天边的星星