手机端网站 - 首页
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>手机端网站</title>
<style>
/* 导航条样式 */
nav {
background-color: {dede:global name='cfg_df_stylecolor'/};
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
}
<pre><code> nav a {
color: #fff;
text-decoration: none;
margin: 0 10px;
}
/* 幻灯片样式 */
.slider {
position: relative;
height: 300px;
}
.slider img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 1s ease-in-out;
}
.slider img.active {
opacity: 1;
}
/* 图片列表样式 */
.image-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
.image-list li {
list-style: none;
width: 30%;
margin-bottom: 20px;
background-color: #000;
color: #fff;
padding: 10px;
text-align: center;
}
/* 服务项目样式 */
.services {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
.services li {
list-style: none;
width: 30%;
background-color: {dede:global name='cfg_df_stylecolor'/};
color: #fff;
padding: 10px;
text-align: center;
}
/* 新闻列表样式 */
.news-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
.news-list li {
list-style: none;
width: 100%;
background-color: #fff;
color: #333;
padding: 10px;
text-align: center;
border-bottom: 1px solid #ccc;
}
/* 公司简介样式 */
.company-intro {
margin-top: 20px;
background-color: #ccc;
color: #333;
padding: 10px;
}
/* 管理团队样式 */
.management-team {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
.management-team li {
list-style: none;
width: 30%;
background-color: {dede:global name='cfg_df_stylecolor'/};
color: #fff;
padding: 10px;
text-align: center;
}
/* 联系方式样式 */
.contact-info {
margin-top: 20px;
background-color: {dede:global name='cfg_df_stylecolor'/};
color: #fff;
padding: 10px;
text-align: center;
}
</style>
</code></pre>
</head>
<body>
<!-- 导航条 -->
<nav>
<a href="#">首页</a>
<a href="#">服务</a>
<a href="#">新闻</a>
<a href="#">关于我们</a>
<a href="#">联系我们</a>
</nav>
<pre><code><!-- 幻灯片 -->
<div class="slider">
{dede:loop adv order='sortrank' row='3'}
<img src="{dede:field name='imgurl'/}" alt="{dede:field name='title'/}" class="{dede:php}$i==1 ? 'active' : ''{/dede:php}">
{/dede:loop}
</div>
<!-- 图片列表 -->
<ul class="image-list">
{dede:loop listtypeid='1' row='6'}
<li>
<a href="{dede:field name='arcurl'/}">
<img src="{dede:field name='litpic'/}" alt="{dede:field name='title'/}">
<h3>{dede:field name='title'/}</h3>
</a>
</li>
{/dede:loop}
</ul>
<!-- 服务项目 -->
<ul class="services">
{dede:loop type='fl' typeid='0' row='3' showmenu='-1'}
<li>
<a href="{dede:field name='typelink'/}">
<h3>{dede:field name='typename'/}</h3>
</a>
</li>
{/dede:loop}
</ul>
<!-- 新闻列表 -->
<ul class="news-list">
{dede:loop type='article' typeid='0' row='10'}
<li>
<a href="{dede:field name='arcurl'/}">
<h3>{dede:field name='title'/}</h3>
<p>{dede:date m='-' d='-'}</p>
</a>
</li>
{/dede:loop}
</ul>
<!-- 公司简介 -->
<div class="company-intro">
<p>{dede:field name='body'/}</p>
</div>
<!-- 管理团队 -->
<ul class="management-team">
{dede:loop type='fl' typeid='0' row='3' showmenu='-1'}
<li>
<a href="{dede:field name='typelink'/}">
<h3>{dede:field name='typename'/}</h3>
</a>
</li>
{/dede:loop}
</ul>
<!-- 联系方式 -->
<div class="contact-info">
<p>{dede:field name='company'/} {dede:field name='address'/} {dede:field name='tel'/}</p>
</div>
<!-- 帝国cms标签 -->
{dede:global name="cfg_templets_skin" /}
</code></pre>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/mZCa 著作权归作者所有。请勿转载和采集!