WordPress主题添加侧边栏“旗下网站”小工具

WordPress主题添加侧边栏“旗下网站”小工具

0746

前言

给网站侧边栏添加一个侧边栏小工具超级好看

效果

图片[1]-WordPress主题添加侧边栏“旗下网站”小工具-乡野博文

教程

把代码复制粘贴到WordPress后台–>外观–>小工具–>html–>放到自己的侧边栏位置

代码

<div class="textwidget"><div class="attentionus"><span class="zhan-widget-link zhan-link-z1"> 
<span class="zhan-widget-link-count">个人博客fuv.cn</span> <a href="https://fuv.cn/" target="_blank" rel="noopener"><span class="zhan-widget-link-title">乡野风情</span> </a></span><br />

<span class="zhan-widget-link zhan-link-z2"> <span class="zhan-widget-link-count">个人博客t35.cn</span> <a href="http://www.t35.cn" target="_blank" rel="noopener"><span class="zhan-widget-link-title">乡野风情</span> </a></span><br />

<span class="zhan-widget-link zhan-link-z3"> <span class="zhan-widget-link-count">个人博客t92.cn</span> <a href="http://www.t92.cn" target="_blank" rel="noopener"><span class="zhan-widget-link-title">乡野风情</span> </a></span><br />

<span class="zhan-widget-link zhan-link-z4"> <span class="zhan-widget-link-count">个人博客k53.cn</span> <a href="http://www.k53.cn" target="_blank" rel="noopener"><span class="zhan-widget-link-title">乡野风情</span> </a></span><br />

<span class="zhan-widget-link zhan-link-z5"> <span class="zhan-widget-link-count">t35音乐频道</span> <a href="http://music.t35.cn" target="_blank" rel="noopener"><span class="zhan-widget-link-title">乡野音乐</span> </a></span></div>
<style type="text/css">
.zhan-widget-link{position:relative;margin-bottom:-10px !important;position:relative;display:block;font-size:13px;background:#fff;color:#525252;line-height:40px;margin-left:-10px;padding:0 

14px;border:1px solid #DDD;border-radius:2px;width:auto}
span.zhan-widget-link.zhan-link-z1 {margin-top: -10px;}
.zhan-widget-link-count i{margin-right:9px;font-size:17px;vertical-align:middle}
.zhan-widget-link-title{position:absolute;top:-1px;right:-14px !important;bottom:-1px;width:100px;text-align:center;background:rgba(255,255,255,.08);transition:width .3s;border-radius:0 3px 3px 0}
.zhan-widget-link:hover .zhan-widget-link-title{width:116px}
.zhan-widget-link a{position:absolute;top:0;left:0;right:0;bottom:0}
.zhan-link-z1{border-color:rgba(236,61,81,.39)}
.zhan-link-z1 i{color:#FFF;margin-right:3px}
.zhan-link-z1 .zhan-widget-link-title{background-color:#ec3d51;color:#fff}
.zhan-link-z2{border-color:rgba(18,170,232,.39)}.zhan-link-z2 i{color:#FFF;margin-right:3px}.zhan-link-z2 .zhan-widget-link-title{background-color:#12aae8;color:#fff}
.zhan-link-z3{border-color:rgba(221,7,208,.39)}
.zhan-link-z3 i{color:#FFF;margin-right:3px}
.zhan-link-z3 .zhan-widget-link-title{background-color:#dd07d0;color:#fff}
.zhan-link-z4{border-color:rgba(249,82,16,.39)}
.zhan-link-z4 i{color:#FFF;margin-right:3px}
.zhan-link-z4 .zhan-widget-link-title{background-color:#f95210;color:#fff}
.zhan-link-z5{border-color:rgba(25,152,114,.39)}
.zhan-link-z5 i{color:#FFF;margin-right:3px}
.zhan-link-z5 .zhan-widget-link-title{background-color:#199872;color:#fff}
</style>
</div>
温馨提示:本文最后更新于2022-05-12 20:34:13,某些文章具有时效性,若有错误或已失效,请在下方留言或联系乡野博文
您阅读这篇文章共花了: 0小时00分00秒
-----本页内容已结束,喜欢请分享!-----
© 版权声明
THE END
喜欢本站内容,请点【点赞】【分享】和【收藏】~
点赞6 分享
评论 抢沙发

请登录后发表评论