H5仿手机微信页面实例教程(1)

日期:2020-10-13 类型:科技新闻 

关键词:如何制作微信小程序,微信小程序源码,小程序码生成,凡科网微信小程序,微信公众号小程序

序言

先来张图,仿手机微信页面,页面以下,其实不彻底1模1样,只能说一些相近,期待大伙儿见谅。

1 用到的专业知识点

jQuery WeUI 是WeUI的1个jQuery完成版本号,除完成了官方软件以外,它还出示了以下拉更新、日历、详细地址挑选器等丰富多彩的扩展组件。jQuery WeUI 中的JS组件均是以JQuery 软件的方式出示,应用十分便捷,而且能够和React、Angular、VUE之类的流行JS架构1起应用。

WeUI 是手机微信官方精英团队对于手机微信出示的1个H5 UI库,它只出示了1组CSS组件。jQuery WeUI 中应用的是官方WeUI的CSS编码,并出示了jQuery/Zepto版本号的API完成。由于立即应用了官方的CSS,因此你无需担忧跟官方版本号的矛盾。具体上 jQuery WeUI == WeUI + jQuery软件。

Font Awesome 是1套完善的标志字体样式,关键目地是和 Bootstrap 配搭应用。

2 引进款式文档

<link href="static/lib/weui.css" rel="stylesheet" type="text/css" /> 
<link href="static/css/jquery-weui.css" rel="stylesheet" type="text/css" /> 
<link href="static/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css" />

3 先说底部菜单

<div class="weui-tabbar"> 
<a href="wx-wx.html" class="weui-tabbar__item "> <span class="weui-badge" style="position: absolute;top: -.4em;right: 1em;">8</span> 
<div class="weui-tabbar__icon"> 
<i class="fa fa-comment-o fa-fw" style=" "></i> 
</div> <p class="weui-tabbar__label">手机微信</p> </a> 
<a href="wx-tongxulv.html" class="weui-tabbar__item"> 
<div class="weui-tabbar__icon"> 
<i class="fa fa-vcard-o" style=" "></i> 
</div> <p class="weui-tabbar__label">通信录</p> </a> 
<a href="#tab3" class="weui-tabbar__item"> 
<div class="weui-tabbar__icon"> 
<i class="fa fa-compass " style=""></i> 
</div> <p class="weui-tabbar__label">发现</p> </a> 
<a href="wx-user.html" class="weui-tabbar__item weui-bar__item--on"> 
<div class="weui-tabbar__icon"> 
<i class="fa fa-user" style=" color:#0dba08;"></i> 
</div> <p class="weui-tabbar__label" style=" color:#0dba08;">我</p> </a> 
</div>

4 头顶部编码

<nav class="blue nav" style=" "> 
<a id="topPopovershow" href="#" class="button button-link right "> <i class="fa fa-plus fa-fw" style=" font-size:20px;" ></i> </a> 
<h1 class="title">手机微信</h1> 
</nav>

5 行为主体一部分

<div class="page-content"> 
<div class="weui-cells" style="margin-top: 0px;">
<a class="weui-cell weui-cell_access open-popup weui-popup-modal " data-target="#full" href="javascript:;">
<div class="weui-cell__hd">
<img width="48px;" class="weui-media-box__thumb" src="images/timg5.jpg" alt="" class="self-header">
</div>
<div class="weui-cell__bd">
<div style=" margin-left:10px;">

<h4 class="weui-media-box__title">小楼听春雨菩提本无树</h4>
<p class="weui-media-box__desc" >菩提本无树,明镜</p>

</div> 
</div>
<div class="weui-cell__ft">22:55</div>
</a>

<a class="weui-cell weui-cell_access" href="javascript:;">
<div class="weui-cell__hd">
<img width="48px;" class="weui-media-box__thumb" src="images/timg2.jpg" alt="" class="self-header">
</div>
<div class="weui-cell__bd">
<div style=" margin-left:10px;">

<h4 class="weui-media-box__title">听春雨</h4>
<p class="weui-media-box__desc" >大伙儿聊闲聊今日下雨了</p>

</div> 
</div>
<div class="weui-cell__ft">22:55</div>
</a>
</div>

6 头顶部css

.nav {
position: fixed;
right: 0;
left: 0;
z-index: 10;
height: 2.2rem;
padding-right: .5rem;
padding-left: .5rem;
background-color: #0993c7;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
color: #FFF;
background-color: #20a0ff;
}

以上便是本文的所有內容,期待对大伙儿的学习培训有一定的协助,也期待大伙儿多多适用脚本制作之家。