1 个回答
主题配置-其它配置-自定义css
.widget .entry-media{display:none} .cao-widget-posts .posts .left {padding: 10px 0 5px 10px;padding-left: 22px;position: relative;border-bottom:none} .cao-widget-posts .posts .num{position: absolute;left: 2px;font-weight: 600;} .cao-widget-posts .posts .left a{height:auto;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} .cao-widget-posts .posts .left:nth-child(1) .num{color:#F44336;} .cao-widget-posts .posts .left:nth-child(2) .num{color:#4CAF50;} .cao-widget-posts .posts .left:nth-child(3) .num{color:#FFC107;} .cao-widget-posts .posts .left:nth-child(4) .num{color:#00BCD4;} .cao-widget-posts .posts .left:nth-child(5) .num{color:#2196F3;} .cao-widget-posts .posts .left:nth-child(6) .num{color:#E91E63;} .cao-widget-posts .posts .left:nth-child(7) .num{color:#34495e;} .cao-widget-posts .posts .left:nth-child(8) .num{color:#f4e3ab;}
网站设置-版权说明
<script>$('#hotposts .left').each(function(k){$(this).prepend('<span class="num">'+(++k)+'</span>')});$('#relatedpost .left').each(function(k){$(this).prepend('<span class="num">'+(++k)+'</span>')});</script>
效果图:
发布于:4年前 (2020-08-01) IP属地:江苏省
我来回答
您需要 登录 后回答此问题!