Home > Web Front-end > H5 Tutorial > Use H5 to imitate WeChat interface

Use H5 to imitate WeChat interface

不言
Release: 2018-06-12 17:09:22
Original
2067 people have browsed it

This article mainly introduces the first article of H5 imitating WeChat interface tutorial in detail, which has certain reference value. Interested friends can refer to it

Preface

Let’s take a picture first, imitating the WeChat interface. The interface is as follows. It is not exactly the same. I can only say that it is somewhat similar. I hope you can forgive me.

1 Knowledge points used

jQuery WeUI is a jQuery implementation version of WeUI. In addition to implementing the official plug-in , it also provides rich expansion components such as pull-down refresh, calendar, address selector, etc. jQuery The JS components in WeUI are all provided in the form of JQuery plug-ins, which are very convenient to use and can be used with mainstream JS frameworks such as React, Angular, and VUE.

WeUI is an H5 UI library provided by the WeChat official team for WeChat. It only provides a set of CSS components. jQuery WeUI uses the official WeUI CSS code, and provides the jQuery/Zepto version of the API implementation. Because the official CSS is used directly, you don’t have to worry about conflicts with the official version. Actually jQuery WeUI == WeUI jQuery plugin.

Font Awesome is a set of perfect icon fonts whose main purpose is to be used with Bootstrap.

2 Introduce the style file

<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" />
Copy after login

3 Let’s talk about the bottom menu first

<p 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> 
<p class="weui-tabbar__icon"> 
<i class="fa fa-comment-o fa-fw" style=" "></i> 
</p> <p class="weui-tabbar__label">微信</p> </a> 
<a href="wx-tongxulv.html" class="weui-tabbar__item"> 
<p class="weui-tabbar__icon"> 
<i class="fa fa-vcard-o" style=" "></i> 
</p> <p class="weui-tabbar__label">通讯录</p> </a> 
<a href="#tab3" class="weui-tabbar__item"> 
<p class="weui-tabbar__icon"> 
<i class="fa fa-compass " style=""></i> 
</p> <p class="weui-tabbar__label">发现</p> </a> 
<a href="wx-user.html" class="weui-tabbar__item weui-bar__item--on"> 
<p class="weui-tabbar__icon"> 
<i class="fa fa-user" style=" color:#0dba08;"></i> 
</p> <p class="weui-tabbar__label" style=" color:#0dba08;">我</p> </a> 
</p>
Copy after login

4 Header code

<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>
Copy after login

5 Main part

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

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

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

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

<h4 class="weui-media-box__title">听春雨</h4>
<p class="weui-media-box__desc" >大家聊聊天今天下雨了</p>

</p> 
</p>
<p class="weui-cell__ft">22:55</p>
</a>
</p>
Copy after login

6 Header 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;
}
Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Use Android imitation WeChat to load the progress bar of H5 page

HTML5 local storage IndexedDB

The above is the detailed content of Use H5 to imitate WeChat interface. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template