You need some javascript that will triger on windows scroll, and check top scroll offset, if greater that some value you will add css class to menu container making it have fixed position with top:0
That is as much as we can help you especially by fact that you are asking something that is not related to our products