+ 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 :)
6 Respostas
+ 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 ^^
+ 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 ;)
+ 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.
+ 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 ;)
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?
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.