使用的是SUI Mobile
是自适应的网页框架,适用于多种终端
1.注册页面使用的是 http://m.sui.taobao.org/demos/form/layout 右键显示源码,就可以复制到自己的项目中去
2.引入相关的静态资源 css js
点击“开始使用“
将模板下的css标签修改到本地的html中
1 <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css"> 2 <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
把模板下的js标签修改到本地的html中
1 <script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script> 2 <script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script> 3 <script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>
然后把对应位置上的内容替换为自己的内容
为了防止直接在网页上使用localhost访问页面,将页面放在WEB-INF下
使用路由转发访问
1 @Controller 2 @RequestMapping(value="shopadmin",method= {RequestMethod.GET}) 3 public class ShopAdminController { 4 @RequestMapping(value = "/shopoperation") 5 public String shopOperation() { 6 return "shop/shopoperation"; 7 } 8 }
因为在spring-web.xml中写了
1 <!-- 3.定义视图解析器 --> 2 <bean id="viewResolver" 3 class="org.springframework.web.servlet.view.InternalResourceViewResolver"> 4 <property name="prefix" value="/WEB-INF/html/"></property> 5 <property name="suffix" value=".html"></property> 6 </bean>
所以可以直接访问了