回答数量1
浏览量928
1 个回答
花晨月夕
花晨月夕管理员
程序猿一枚,专注web相关开发,可开发网站、小程序、app、cms系统、erp系统、oa系统等等

主题配置-其它配置-自定义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>

效果图:

image.png

发布于:4年前 (2020-08-01)IP属地:江苏省
我来回答
欢迎QQ/微信咨询我