Pop up for Show informatation
Loading
Pop up for Show informatation
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Apr 1, 2025, 6:49 AM
An example of a pop-up with a Metro UI theme . Metro UI is known for its clean, minimalistic design, flat colors, and emphasis on typography.
Flat Colors :
#0078d7(Metro blue), which is used for buttons, headers, and accents.#f4f4f4) to emphasize the flat design.Typography :
'Segoe UI', which is the default font for Metro UI.Minimalistic Design :
border-radius: 5px).box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2)) to give depth without being distracting.Button Styling :
Header and Text :
#0078d7) for emphasis.line-height: 1.5).How It Works
Trigger Button :
Overlay :
Pop-up Box :
×) is styled in Metro blue for consistency.JavaScript Logic :
activeclass for showing/hiding the pop-up.Tuhin PaulPosted Apr 1, 2025, 6:45 AM
The design uses darker colors for the overlay and pop-up box, along with light text for better contrast.
Dark Overlay :
.overlayhas a very dark background (rgba(0, 0, 0, 0.9)) to create a moody, immersive effect.Dark Pop-up Box :
.popuphas a dark background (#1e1e1e) and light text (#ffffff) for high contrast.#ff4d4d) to make it stand out.Button Styling :
#333333) with light text (#ffffff) to match the theme.#555555).JavaScript Logic :
activeclass for showing/hiding the pop-up.Tuhin PaulPosted Apr 1, 2025, 6:43 AM
To create a pop-up in HTML that displays information when triggered (e.g., by clicking a button), you can use a combination of HTML , CSS , and JavaScript . Below is an example of how to implement this:
HTML Structure :
#openPopup) triggers the pop-up..overlaydiv creates a semi-transparent background behind the pop-up..popupdiv contains the actual content of the pop-up.CSS Styling :
.overlayand.popupare hidden by default (display: none).activeclass is added, they become visible (display: block)..popupis centered usingposition: fixed,top: 50%,left: 50%, andtransform: translate(-50%, -50%).JavaScript Logic :
activeclass to both.overlayand.popup.×) or clicking outside the pop-up removes theactiveclass, hiding the pop-up.Sangeetha SPosted Apr 1, 2025, 4:20 AM
PopUpComponent.razor:
MainPage.razor:
Shubham SidnalePosted Mar 30, 2025, 10:18 AM
Using a Popup in ASP.NET MVC / Blazor
For web applications in ASP.NET MVC or Blazor, popups are typically created using JavaScript modals like Bootstrap Modals.
Example (ASP.NET MVC with Bootstrap):