
加了个可以改的宽度,修改第一句的宽度1270px为你网站的宽度就好:我的autofull模板改进版
<div style="width:1270px" id="_ylbox" class="pk-row pk-container11 pk-margin-bottom-15 pk-hide">
<div class="pk-w-sm-12">
<div class="pk-background-color-white pk-radius-4" style="position:relative;padding:6px 2px">
<table style="border:0;width:100%;font-size:14px"></table>
<i style="position:absolute;width:22px;height:12px;bottom:0;right:0;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAMCAYAAABm+U3GAAABg0lEQVQ4T7WTsWvCQBTGv9giGMgNDRTRxkHdK1Ts5qKQsdS9/0ChOIhginM1oxS6l+JacBQ7ubX/gC4uWuUQ4pBABEm1PEFJNNJBetPxvrsf333vngBAAHAB4AzAKY5bPwAMAN8EVQCcH8fbu80JfOnnVFVVpuv6bSqVenVfazabGc65VSqVet1ut5DNZt99TDkEvnILdJgxJlEtkUjkB4PBB+1N07QIwjmvLxYLczabjRVFuR6NRp+kdzqdr3K53Nuw9sC2bbc0Tbv3iyadTkdzuVxB1/Vn0jVNe6jVaut9v9+32u22eRA8n89boVDoxg88mUzqwWCQkSYIAkRRjNq2PV6tVnAcxwyHw5WDYMuy3iRJujvUzGKxGPXTGo3G2F3fi+IvMLmeTqe95XKJQCCwZsXj8TxjzGPGA6bGJZPJTCQS2T5p191wOHyMxWJP7rphGC+yLHv64vlu5LZarVZ2n+WGbHKmjClbWpS1KIruvqy/278NyGakZQAnR07gdqR/AfaxlNWnCI7OAAAAAElFTkSuQmCC');background-repeat:none;cursor:pointer" onclick="location.href='read-4358-1.html'"></i>
</div>
</div>
</div>
<script>
$(function() {
var ads = [];
ads[3] = {
title: "聚货网注册就送SVIP+",
href: "https://www.jvhuo.com",
class: "pk-text-danger",
expdate: "2119-08-19"
}
ads[5] = {
title: "免备案虚拟主机5折购",
href: "https://www.hadsky.com/vh.html",
class: "pk-text-danger",
expdate: "2119-07-13"
}
ads[10] = {
title: "承接中小型网站定制",
href: "https://www.hadsky.com/read-4501-1.html",
class: "pk-text-primary",
expdate: "2119-07-13"
}
//h代表几行,l代表几列
var h = 2,
l = 5,
html = '';
for(var j = 0; j < h; j++) {
html += '<tr>';
for(var i = 0; i < l; i++) {
html += '<td style="width:' + (100 / l) + '%;padding:3px 2px 3px 12px"><div class="pk-text-nowrap" style="max-width:234px;overflow:hidden">';
var d = j * l + i + 1;
var o = ads[d];
var f = true;
if(typeof o!="undefined") {
var nowtime = (new Date()).getTime();
var exptime = Date.parse(new Date(o.expdate));
//alert(nowtime);
if(nowtime < exptime) {
if(o.html){
html += o.html;
}else{
html += '<a target="_blank" href="' + o.href + '" class="' + o.class + ' pk-hover-underline">' + o.title + '</a>';
}
f = false;
}
}
if(f) {
html += '<a target="_blank" href="https://www.hadsky.com/read-4358-1.html" class="pk-hover-underline" title="广告位有空,点击查看详情" style="color:#777">AD' + (d < 10 ? '0' + d : d) + '虚位以待</a>';
}
html += '</div></td>';
}
html += '</tr>';
}
$('#_ylbox').removeClass('pk-hide').find('table').append(html);
});
</script>