+ 2

How can I make an overview welcome page in html?

I would like to have a little "alert" appear when someone views my index.html page. I also am using javascript. but I dont want that dull white alert box that js has. I tried alertify but it didn't work. does anyone have any ideas or hits as to how I could create this? it would appear only when the user first arrives to the webpage. then gone forever, unless they refresh... id also like to incorporate this same style for a prompt later on. anything will help :)

3rd Mar 2017, 8:04 AM
Michael Szczepanski
Michael Szczepanski - avatar
6 Answers
+ 4
Follow the way shown by @valentin, and use cookies or web storage to register a value that your JS will check: if the value is already set, you don't show the <div>, else you show it and save the value for the next load/refresh ^^
3rd Mar 2017, 2:12 PM
visph
visph - avatar
+ 4
You can set you <div> for being full sizing in the viewport, setting it a transparent color, and centering inside whatever you want styled at your convenience, and using css transitions animations if you want, or performing this kind of enhancement with JS... Imagination is near to be the only limit to your creativity ;)
3rd Mar 2017, 3:17 PM
visph
visph - avatar
+ 2
I would recommand you to create a div (looking like how you want it to be) with an absolute position, so you can place it on top of other elements. Make its style to display: none. Then with javascript, on page load event, display this div. If you want to make it disapear from user clicking on it, just implement the event and display the div in this event.
3rd Mar 2017, 12:48 PM
valentin
+ 1
ill be sure to post the link in here so yall can check it out and play once I finish it :D thanks. *everything is done... just tryna make it look fancy ;)
3rd Mar 2017, 3:30 PM
Michael Szczepanski
Michael Szczepanski - avatar
0
and I would make another div for later with a text input that would save it to a variable when the user enters their information with an onClick event. would I be able to make the "background dim" while the div is showing on the page?
3rd Mar 2017, 3:09 PM
Michael Szczepanski
Michael Szczepanski - avatar
0
i finished. if yall wanna check it out :D https://pankakes102.github.io/2048Game/ thanks for all the tips!!! **only looks good in Desktop or laptop, not mobile yet... sorry.
4th Mar 2017, 1:22 AM
Michael Szczepanski
Michael Szczepanski - avatar