Since you are on localhost, so we could not provide the exact solution on this issue, however you can paste this CSS code in the Custom CSS Box provided through the Customizer Options and see if it works:-
The feature which you require for your site needs lots of code customization work, which we could not cover through this forum. Hope you can understand. But, if you can code it by yourself, then, please feel free to do so but by using the child theme. You might need to modify the ‘header.php’ file for this. Thanks.