子比主题美化教程,子比美化设置汇总

子比主题文章图片圆角样式

放到:子比主题–>>自定义CSS样式即可!

.wp-posts-content img {border-radius: 15px;}

首页文章列表悬停上浮代码

将下面代码放置自定义CSS即可!

/*首页文章列表悬停上浮开始*/
@media screen and (min-width: 980px){.tab-content .posts-item:not(article){transition: all 0.3s;}.tab-content .posts-item:not(article):hover{transform: translateY(-10px); box-shadow: 0 8px 10px rgba(255, 112, 173, 0.35);}}
/*首页文章列表悬停上浮结束*/

子比主题 – 评论输入框贴图美化样式

一款评论区的评论输入框贴图,喜欢的自行部署吧,如果想换图片自己把:url(‘图片链接’)里的图片链接换成你的即可!

放到:子比主题–>>自定义CSS样式即可!

textarea#comment {background-color:transparent;background:linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)),url('图片url地址') right 10px bottom 10px no-repeat;-moz-transition:ease-in-out 0.45s;-webkit-transition:ease-in-out 0.45s;-o-transition:ease-in-out 0.45s;-ms-transition:ease-in-out 0.45s;transition:ease-in-out 0.45s;}textarea#comment:focus {background-position-y:789px;-moz-transition:ease-in-out 0.45s;-webkit-transition:ease-in-out 0.45s;-o-transition:ease-in-out 0.45s;-ms-transition:ease-in-out 0.45s;transition:ease-in-out 0.45s;}

子比主题 – 复制自动带上文章标题和文章链接

这就是给自己的网站加一个复制任何内容加一个版权在文字里面!

将下面的代码放到:子比主题–>>自定义javascript代码即可!

document.addEventListener('copy', function(e) {
    const selection = window.getSelection();
    const selectedText = selection.toString();
    
    if (!selectedText) return;

    const postTitle = document.title;
    const postUrl = window.location.href;

    const copyright = '\n\n---\n文章标题:' + postTitle + '\n原文链接:' + postUrl + '\n转载请注明出处。';

    e.clipboardData.setData('text/plain', selectedText + copyright);
    e.preventDefault();
});

1 2 3 4 5 6 7 8

👋 感谢您的观看!

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享