The question is this. The page has a hidden block that opens when you click a button. Opens as a popup window on top of all other content. Is it possible to somehow enter a link in the browser string so that this block opens immediately? Hidden block means css (display: none;). Block assigned id = "inline". Is it possible to do this?
- and why through the browser string? why not via the browser console? - Alexey Shimansky
- or is c # better? or on the python? - user33274
|
1 answer
The question of the author does not say whether the contents of the window should change, so the simplest option:
<style> #popup { display:none; } #popup:target { display:block; } </style> <div id="popup">Pop-up!</div> When you go to the index.html # popup page, the element with the ID specified in the anchor (#popup) will be shown, since the pseudo-selector: target is triggered. Any id can be anchored and #id: target will be executed for it
If you also need to change the text in the window, you can pass it through GET or change it immediately when the page is generated (in PHP?), In that case you can even immediately register an additional class to the block so that it is shown when the page is loaded.
- Thank you very much! Very helpful. Now displays the contents of the hidden block! True, not very neat when you click on the link, but I think in css you just need to fix it. - Peter
|