I want to create a close button that will close the page like light box close button..
A page doesn't really close. You can go "back" or go to another page, but a page doesn't really close. You could "simulate" a page close by just going back to the previous page.
Do you know how to create back button which allows user to navigate to a previously viewed page because there is no back button on wix we have add a button and link it.
You can use wix-window.referrer to get the page from where you came, and wix-location.to() to go back (limit to a local page so you don't go to some external site).