本文转自 阿蛮君 博客 WordPress 主题美化 – 评论框添加背景图 - 阿蛮君博客 (amjun.com)
添加如下 css,可给评论框添加背景图:
/*评论背景图*/
textarea#comment {
background-color:transparent;
background:linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)),url(/wp-content/uploads/2023/03/comment.png) 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;
}
背景图链接需要替换为自己的,效果如下:
![图片[1]-WordPress 主题美化 – 评论框添加背景图-追梦人](https://cdn.dreamren.cn/wp-content/uploads/2025/08/20250805110711342.webp?imageMogr2/format/webp/blur/1x0/quality/100)
本站资源均为网友推荐收集整理而来,请勿商业运营,仅供学习和研究,请在下载后24小时内删除!!
© 版权声明
THE END




![「子比美化」给导航菜单添加自定义徽章及多种样式菜单设置方法[图文教程]-追梦人](https://cdn.dreamren.cn/wp-content/uploads/2025/06/20250617115832544.webp)






