- <style>
- .hh_article{clear:both;} /*文章带置顶样式*/
- .hh_article li.tw{text-align:left;border:1px dotted #cccccc;border-width:0 0 1px 0;padding:5px 0 5px 0;overflow:hidden;} /*置顶通用样式*/
- .hh_article .tw .pic{float:left;margin:5px 10px 5px 0;border:1px solid #dddddd;display:inline}
- .hh_article .tw .title{text-align:left;line-height:25px;}
- .hh_article .tw .title a{font-weight:bold;padding-left:0px;font-size:14px;color: #cc0000}
- .hh_article .tw .introduct{padding:2px 5px 5px 0px;line-height:20px;color: #666666;}
- .hh_article .tw .pixc{float:right;width:30px;height:30px;border:1px solid #000}
- .hh_article li.normal{clear:both;height:40px;line-height:40px;text-align:left;overflow:hidden;}
- .hh_article .normal .title{float:left;text-align:left;padding:0 0 0 10px;background:url(images/article_arrow.gif) no-repeat left center;}
- .hh_article .normal .date{float:right;color: #666666;padding-right:2px}
- </style>
- <div class="hh_article">
- <ul>
- <%
- string pic="/e/images/diy/toip.jpg",istop="0";
- DataTable dt;
- DataRow dr;
- dt=Get_Data();
- for(int i=0;i<dt.Rows.Count;i++)
- {
- dr=dt.Rows[i];
- pic=dr["titlepic"].ToString();
- istop=dr["istop"].ToString();
- %>
- <%if(istop=="1"){%>
- <li class="tw">
- <span class="title"><a href="<%=Detail_Url(dr)%>" target="<%=Target%>" title="<%=Server.HtmlEncode(dr["title"].ToString())%>" style="<%=dr["pa_style"]%>"><%=SubStr(dr["title"].ToString(),Title_Num,true)%></a></span><span><%=((DateTime)dr["thedate"]).ToString("yyyy-MM-dd")%></span><a href=""><img src="<%=pic%>" class="pixc"></a>
- </li>
- <%}
- else
- {%>
- <li class="normal"><span class="title">
- <a href="<%=Detail_Url(dr)%>" target="<%=Target%>" title="<%=Server.HtmlEncode(dr["title"].ToString())%>" style="<%=dr["pa_style"]%>"><%=SubStr(dr["title"].ToString(),Title_Num,true)%></a></span>
- <span class="date"><%=((DateTime)dr["thedate"]).ToString("MM-dd")%></span>
- <span class="clear"></span>
- </li>
- <%
- }
- }
- %>
- </ul></div>
复制代码
这一块放在css文件中,

这一块在表单模型中的文章资讯的模型管理中,新建一个数据模型,粘贴到里面,

这个你可以替换你想要的图片路径,

置顶是istop,最新是isnew,推荐是isgood,热门是ishot