首先,需要使用wp\\u register\\u script()和wp\\u register\\u style()函数注册样式和css
//registering css
wp_register_style ( \'mysample\', plugins_url ( \'css/MapStyle.css\', __FILE__ ) );
wp_register_script ( \'mysample\', plugins_url ( \'js/MapStyle.js\', __FILE__ ) );
之后,您可以调用wp\\u enqueue\\u style()函数在所需页面中加载css
wp_enqueue_style(\'mysample\');
wp_enqueue_script(\'mysample\');