WordPress admin menu display glitch in Google Chrome

后端 未结 6 1502
轻奢々
轻奢々 2021-02-05 19:37

A recent update to Google Chrome seems to be causing issues with my WordPress admin menus.

This is happening on all sites, whether in local development or on t

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-05 20:22

    try this for chrome-only

    in functions.php:

    /* fix glitch on chrome for admin menus */
    function chromefix_inline_css() { 
        wp_add_inline_style('wp-admin', '@media screen and (-webkit-min-device-pixel-ratio:0) { #adminmenu { transform: translateZ(0); } }');
    }
    add_action('admin_enqueue_scripts', 'chromefix_inline_css');
    

提交回复
热议问题