• 欢迎 游客 您的光临,下载之前请先阅读 积分规则(暂行) 。任何技术问题请在论坛提问,本站定制插件、模板主题。售前、售后问题请联系QQ:5916171
  • 发帖需要扣除两点虚拟积分是为了控制乱发广告,如不便可进群提问。点击链接加入群聊【XenForo讨论社区】:群号1:143277648

模板修改 给推荐资源加图标

死了算了

管理成员
UID
1
注册
2017/07/28
消息
1,568
解决方案
117
黄金
151,835G
1511664118728.png
css 样式
CSS:
.structItem--resource span.featured {
    display: block;
    width: 70px;
    height: 70px;
    position: absolute;
    overflow: hidden;
    opacity: .7;
    transition: opacity 0.2s ease;
    z-index: 999;
}
.structItem--resource:hover span.featured {
    opacity: 1;
}
.structItem--resource span.featured::after {
    content: '推荐';
    background: #e68c17;
    color: #fff4e5;
    font-weight: normal;
    font-style: normal;
    width: 100px;
    font-size: 13px;
    line-height: 18px;
    height: 18px;
    text-align: center;
    position: absolute;
    top: 17px;
    left: -25px;
    pointer-events: none;
    text-shadow: 1px 1px 1px #8f6c3f;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

添加xf语句到 xfrm_resource_list_macros
查找
代码:
<div class="structItem-iconContainer">
在后边添加
代码:
       <xf:if is="$resource.Featured">
                    <span class="featured"></span>
                </xf:if>
1511664301916.png
1511664431843.png
 

死了算了

管理成员
UID
1
注册
2017/07/28
消息
1,568
解决方案
117
黄金
151,835G
如果和你当前资源列表图标位置不对请自行调整
 
顶部 底部