WordPress侧边栏添加广告链接样式代码

作者 : 柠檬 本文共1261个字,预计阅读时间需要4分钟 发布时间: 2020-03-1 共296人阅读

WordPress侧边栏添加广告链接样式代码

安装

管理后台->[小工具]里在你需要显示的地方添加HTML小工具 切换为文本模式,将下面样式代码复制保存即可!

<a class="ads" href="https://wuzuhua.cn" target="QQ群加入">
<h4>QQ群加入</h4>
<h5>欢迎各位大佬进群交流</h5>
<span class="ads-btn ads-btn-outline">立即加入</span></a>
<style>
.ads {
    display:block;
    padding:40px 15px;
    text-align:center;
    color:#fff!important;
    background:#ff5719;
    background-image:-webkit-linear-gradient(135deg,#bbafe7,#FF7A62);
background-image:linear-gradient(135deg,#bbafe7,#FF7A62)
}
.ads h4 {
    margin:0;
    font-size:22px;
    font-weight:bold
}
.ads h5 {
    margin:10px 0 0;
    font-size:14px;
    font-weight:bold
}
.ads.ads-btn {
    margin-top:20px;
    font-weight:bold
}
.ads.ads-btn:hover {
    color:#ff5719
}
.ads-btn {
    display:inline-block;
    font-weight:normal;
    margin-top:10px;
    color:#666;
    text-align:center;
    vertical-align:top;
    user-select:none;
    border:none;
    padding:0 36px;
    line-height:38px;
    font-size:14px;
    border-radius:10px;
    outline:0;
    -webkit-transition:all 0.3s ease-in-out;
    -moz-transition:all 0.3s ease-in-out;
    transition:all 0.3s ease-in-out
}
.ads-btn:hover,.btn:focus,.btn.focus {
    outline:0;
    text-decoration:none
}
.ads-btn:active,.btn.active {
    outline:0;
    box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)
}
.ads-btn-outline {
    line-height:36px;
    color:#fff;
    background-color:transparent;
    border:1px solid#fff
}
.ads-btn-outline:hover,.btn-outline:focus,.btn-outline.focus {
    color:#343a3c;
    background-color:#fff
}
</style>