- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 162字
- 2021-07-02 19:57:22
Image modal window
To prevent our header image from dominating the page, we've cropped it and limited its height. But what if the user wants to see the image in its full glory? A great UI design pattern to allow the user to focus on a single item of content is amodal window.
Here's what our modal will look like when opened:

Figure 2.10. Header image modal
Our modal will give a properly scaled view of the header image so the user can focus on the appearance of the lodgings without the distraction of the rest of the page.
Later in the book, we will insert an image carousel into the modal so the user can browse through a whole collection of room images!
For now, though, here are the required features for our modal:
- Open the modal by clicking the header image
- Freeze the main window
- Show the image
- Close the modal window with a close button or the Escape key
推薦閱讀
- Hyper-V 2016 Best Practices
- Angular UI Development with PrimeNG
- Mastering SVG
- 程序員數學:用Python學透線性代數和微積分
- C語言程序設計教程(第2版)
- Network Automation Cookbook
- Learning Laravel 4 Application Development
- Microsoft System Center Orchestrator 2012 R2 Essentials
- SharePoint Development with the SharePoint Framework
- Responsive Web Design by Example
- 程序是怎樣跑起來的(第3版)
- Python編程從0到1(視頻教學版)
- 執劍而舞:用代碼創作藝術
- C語言程序設計習題與實驗指導
- Hands-On Kubernetes on Windows