1.先下载一个可以测试手机版本的软件,那就是微信web开发者工具
2.点开始之后编写代码(我们这里是使用dedecms,所以要建立index.htm,head.htm,footer.htm,list_article.htm,article_article,index_article,这五个页面)
3.编写头部
<header>
<div class="topBar">
<img src="{dede:global.cfg_templets_skin/}/images/index_01.jpg" width="100%" class="img-responsive" alt=""></a>
</div>
<div class="weui-search-bar" id="searchBar">
<form class="weui-search-bar__form">
<div class="weui-search-bar__box">
<i class="weui-icon-search"></i>
<input type="search" class="weui-search-bar__input" id="searchInput" placeholder="搜索" required="">
<a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
</div>
<label class="weui-search-bar__label" id="searchText">
<i class="weui-icon-search"></i>
<span>搜索</span>
</label>
</form>
<a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
</div>
<nav>
<div class="navWrapper">
<ul id="navMain">
<li class="item"><a href="http://www.sjzpt.edu.cn"><span>学院首页</span></a></li>
<li class="item"><a href="{dede:global.cfg_indexurl/}"><span>首页</span></a></li>
{dede:channelartlist typeid="top" }
<li class="item"><a href="node_42675.htm"><span>{dede:field name='typename'/}</span></a></li>
{/dede:channelartlist}
</ul>
</div>
</nav>
</header>
![](https://i-blog.csdnimg.cn/blog_migrate/0d7ffa5fac987f1a32ce82e8d4752009.png)
4.main.htm页面(实现页面轮换)
<section>
<div id="slider" class="owl-carousel" >
<!--begin 5262425-59891-1-->
<div class="item">
<figure>
<a href="{dede:type typeid='20'}[field:typelink /]{/dede:type}" target="_self">
<img src="{dede:global.cfg_templets_skin/}/images/s1.jpg" border="0">
</a>
<figcaption>
<h3>
<a href="{dede:type typeid='20'}[field:typelink /]{/dede:type}" target="_self">{dede:type typeid="20"}[field:typename /]{/dede:type}
</a>
</h3>
</figcaption>
</figure>
</div>
<div class="item">
<figure>
<a href="{dede:type typeid='43'}[field:typelink /]{/dede:type}" target="_self">