需要帮助将WordPress短代码添加到我的css页面

#investment-focus-hero .jumbotron {
    background: /* top, transparent red, faked with gradient */ linear-gradient( rgba(255 , 255, 255, 0.05), rgba(0, 0, 0, 0.85)), /* bottom, image */ url('<?php echo do_shortcode('[acf field="jumbotron_full_image" post_id="237"]'); ?>');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding-top: 37.42%;
}

Change the extension of the file to php, then update your link tag's file path where you load in the CSS file in your header.

So your link tag would go from this:

<link href="css/styles.css" rel="stylesheet" type="text/css" />

To this:

<link href="css/styles.php" rel="stylesheet" type="text/css" />

This way the CSS gets run by the server!