Html 我不知道';我不知道TwentyOne中的CSS列表
我正在使用WordPress中的二十二一创建HP。 我在子主题中编写CSS,因为我想减少页眉边距(填充),但我无法通过任何方式更改它Html 我不知道';我不知道TwentyOne中的CSS列表,html,css,Html,Css,我正在使用WordPress中的二十二一创建HP。 我在子主题中编写CSS,因为我想减少页眉边距(填充),但我无法通过任何方式更改它 /* style.css Theme Name: child Template: twentytwentyone */ .site-header { padding-top: 0; padding-bottom: 0; } header#masthead.site-header.has-logo.has-menu { padding:
/*
style.css
Theme Name: child
Template: twentytwentyone
*/
.site-header {
padding-top: 0;
padding-bottom: 0;
}
header#masthead.site-header.has-logo.has-menu {
padding: 0;
}
如果上面的代码有什么需要补充的,请告诉我好吗?
另外,即使我直接编辑TwentyOne主题的代码(即使我直接编辑父主题),客户端页面的边距(填充)也不会变小,所以我什么都做不了,所以我问了一个问题
目前,我正在使用FileZilla连接到SFTP并上传css文件,由于我可以确认在WordPress上本地编辑的代码,我认为代码本身已反映出来。检查页面时,是否应用了您的样式?它可能会被应用于标头的默认css所否决。另外:
客户端页面的边距(填充)
。边距和填充是两种不同的东西。如果页眉有边距,则添加填充:0
不会起任何作用。非常感谢你。我解决了。
<?php
//function.php
add_action('wp_enqueue_scripts', 'theme_enqueue_styles');
function theme_enqueue_styles(){
wp_enqueue_style('parent-style', get_template_directory_uri().'/style.css' );
wp_enqueue_style('child-style', get_stylesheet_directory_uri().'/style.css', array('parent-style'));
}
?>