Home > Web Front-end > HTML Tutorial > dede 最近一天发布的文章标题前加hot_html/css_WEB-ITnose

dede 最近一天发布的文章标题前加hot_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:37:19
Original
1150 people have browsed it

{dede:list pagesize ='15'}                		<!-- 模板1 -->			<div class="news_list tp_a setp1">            			  <p class="title [field:pubdate runphp='yes']              $aa=strftime('%m-%d',@me);              $ntime = time();              $tagtime = @me;              $day1 = 3600 * 24 * 1;              if($tagtime > $ntime-$day1) @me = 'hot';              else @me = "";              [/field:pubdate]">                             [field:pubdate runphp='yes']              $aa=strftime('%m-%d',@me);              $ntime = time();              $tagtime = @me;              $day1 = 3600 * 24 * 1;              if($tagtime > $ntime-$day1) @me = '<span>热</span>';              else @me = "";              [/field:pubdate]                                                <a target="_blank" href="[field:arcurl/]">[field:title/]</a></p>				<a target="_blank" href="[field:arcurl/]" class="thum1">					<img  src="[field:picname/]" / alt="dede 最近一天发布的文章标题前加hot_html/css_WEB-ITnose" >				</a>				<p class="txt">					<a target="_blank" href="[field:arcurl/]">                    [field:description function="cn_substr(@me,200)"/]...[详情]                    </a>				</p>				<span class="source">[field:pubdate function="GetDateTimeMK(@me)" /] 来源:[field:source/]</span>			</div>			<!-- 模板1 -->	{/dede:list}
Copy after login

  css

.news_list .title.hot{  text-indent: 20px;  position: relative;}.news_list .title.hot span{  text-indent: 0;  position: absolute;  display: block;  left: 0;  top: 21px;  width: 18px;  height: 18px;  line-height: 16px;  font-size: 12px;  color: #ffffff;  border: 1px solid #E10400;  background-color: #FF4200;  border-radius: 2px;  text-align: center;  font-family: "\5b8b\4f53";}
Copy after login

 效果

 

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