2.软文推荐
3.软文推荐
dedebiz添加查看全文html代码的简单方法:
<div id="article_content" class="article_content clearfix">
<div id="content_views" class="htmledit_views">
{dede:field.body/}
</div>
</div>
<div id="treeSkill"></div>
<div id="vip">
<a class="submit" href="{dede:field name='arcurl'/}" rel="nofollow">查看全文</a>
</div>
CSS代码:
.article_content
{
height: 200px;
overflow: hidden;
}
#vip
{
width: 100%;
background-image: -webkit-gradient(linear,left top, left bottom,from(rgba(255,255,255,0)),color-stop(70%, #fff));
background-image: linear-gradient(-180deg,rgba(255,255,255,0) 0%,#fff 70%);
padding-bottom: 16px;
text-align: center;
position: relative;
z-index: 998;
padding-top: 200px;
margin-top: -200px;
}
.submit
{
font-size: 16px;
background-color: #00CC69;
border-color: rgba(48,131,235,0.9);
color: #FFFFFF;
border-radius: 3px;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.entry-copyright {
padding: 6px;
font-size: 12px;
line-height: 1.6;
color: #828282;
border: 1px solid #efefef;
background: rgba(239,239,239,.4);
border-radius: 4px;
}
js代码:
$(function () {
if (GetUrlPara() == "action=onClick") {
$("#article_content").removeClass("article_content");
$("#vip").remove();
}
else{
setTimeout(() => {
$(".baidu_pl").removeAttr("style");
$("#article_content").removeAttr("style");
if($('#vip a').length>1)
{$('#vip a').attr("href",$('#vip a:last').attr("href")+"?action=onClick");}else{$('#vip a').attr("href",$('#vip a').attr("href")+"?action=onClick");}
}, 1000);
}
});
function GetUrlPara() {
var url = document.location.toString();
var arrUrl = url.split("?");
var para = arrUrl[1];
return para;
}
1
让dedebiz的tag标签后显示每个标签相应的文章数量:让文章更加丰富起来,很多朋友都会有这个需要。 {dede:tag row='10' sort='new' getall='1'}a href...