header_image() with CSS

No, in general, it’s not possible to use php in CSS. But you can set background image in php file. Like..

<div class="headerimg" style="background-image: url(<?php echo header_image(); ?>)"></div>

Then in CSS file using class you can set all the other properties you need like height, width, background-position and so on.