To stretch a background image in CSS, add the following code in the style of the box or body:
I hope this will work for you.
If It Doesn’t Work:
If there is no any change by adding this code, try using below code instead of above:
If It Doesn’t Look Better:
If the above codes make a background image ugly, try using one of the following codes:
(You can add “!important” property if needed).