3 ms·
You can implement modals without JS, with HTML and CSS. For an example, click on '?' in the top right corner here: https://aavi.xyz/proj/colors/ https://aavi.x
by aaviator42 3y ago
You can implement modals without JS, with HTML and CSS.
For an example, click on '?' in the top right corner here: https://aavi.xyz/proj/colors/ https://aavi.xyz/proj/colors/
- ovao 3y agoThere are useful tricks to changing CSS properties via checkbox state and pseudo-selectors to implement simple modals (which won’t be accessible), but you can’t open a modal <dialog> element without JS. Weirdly, you can close them with a form submission, but you can’t open them with one.