我正在尝试在wp管理员的主页编辑器中添加一些css和js代码。
我正在使用simply
<script type="text/javascript">
jQuery(document).ready(function($) {
$(\'.x-feature-box\').each(function() {
var self = $(this),
icon_href = self.find(\'.x-feature-box-text a:last-child\').attr(\'href\');
if ( icon_href.length > 0) {
$(self).find(\'.x-feature-box-graphic-inner > *\').wrap(function() {
return \'<a href="\' + icon_href + \'" target="_parent"></a>\';
});
}
});
});
</script>
<style id="cornerstone-custom-page-css" type="text/css">
.maps iframe{
pointer-events: none;
}
p.x-feature-box-text a{
font-size:1.5em !important;
color:white !important;
}
.x-text{color:rgb(250, 250, 250)}
</style>
位于编辑器中内容的顶部。Javascript正在工作,但css不工作,因为此代码不会在所有css文件的末尾调用,而是加载到css文件的上方。此外,我希望这些代码能够像使用挂钩一样添加到正确的位置。表示刚好在body标签上方。
当我添加这个代码时<p>
在我的首页上增加空间的标签。
我不知道怎么做,但这对我来说非常关键。请帮忙。