如何在functions.php中设置类的样式

[![enter image description here][1]][1]I added I some classes to my functions.php like so:

add_action('admin_menu',
    'wpso_custom_links_admin_menu');

function wpso_custom_links_admin_menu() {
        global $submenu;
        $submenu['index.php'][] = array('Link One', 'read',
            'https://www.example.com/', '', 'jobs-dashboard');
        $submenu['index.php'][] = array('Link Two', 'read',
            'https://asdf.com/', '', 'events-dashboard
            ');
        }

Then I added css:

. jobs-dashboard {background-color: green;}

Didn't work. Why not? enter image description here

[1]: https://i.stack.imgur.com/IEdMC.jpgenter image description hereenter image description here

It looks like you are using your themes additional CSS option, which is typically for front end CSS changes.

To add CSS to the admin area you can use the admin_head hook in your functions.php.

add_action('admin_head', 'my_custom_css');
function my_custom_css() {
  echo '<style>
    .jobs-dashboard {background-color: green;}
  </style>';
}

I think it doesn't work because you put a space in you class:

. jobs-dashboard {background-color: green;}