我想根据代码嵌入的类别/分类来显示不同的文本,即当类别是.category-rabbitmq时。
当类别是.category-rabbitmq时,这可以改变背景。
<style>
.category-rabbitmq
{
background-image: url('https://www.nastel.com/wp-content/uploads/2022/04/nastel_navigator_xpress.png') !important;
background-size: cover;
}
</style>
<themainbody>阅读更多关于</themainbody><br>
这总是显示一个变量。
<style>
themainbody::after {
content: " RabbitMQ";
}
</style>
<themainbody>阅读更多关于</themainbody><br>
然而,这在仅在设置类别时显示变量时不起作用:
<style>
.category-rabbitmq
{
themainbody::after {
content: " RabbitMQ";
}
</style>
<themainbody>阅读更多关于</themainbody><br>
你能帮忙吗?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号