gpt4 book ai didi

css - wordpress 中的自定义 css 样式但不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 10:59:38 24 4
gpt4 key购买 nike

我已经为这个问题苦苦挣扎了一段时间,但仍然找不到解决方案。我已经在 wordpress 页面中为谷歌日历创建了自定义 CSS,但问题是,它不起作用。

我把这段代码放在页面中,我也放入了主题的自定义 css,但它没有显示:

<style>
span#calendarTitle {display:none !important;}
.header img {display:none !important;}
.tab-name {display:none !important;}
.footer {display:none !important;}
.ui-rtsr-first-tab {display:none !important;}
</style>

希望有人能看出我做错了什么。附上直播页面链接:http://dilog.com.my/testing-page/

谢谢

最佳答案

由于您无法更改页面样式,除非您可以直接访问源 html 和/或 css 文件,否则显示在 iframe 中。供您引用,详情请阅读此文Cross-site scripting (XSS)

尝试添加一些 jQuery 函数来隐藏 iframe 中的内容

$('iframe').load( function() {
$('iframe').contents().find("head").append($("<style type='text/css'> span#calendarTitle { display:none; } </style>"));
});

关于css - wordpress 中的自定义 css 样式但不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34430166/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com