- 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
推薦閱讀
- Java 9 Programming Blueprints
- SQL for Data Analytics
- Git高手之路
- Effective Python Penetration Testing
- Spring快速入門
- 組態軟件技術與應用
- C# and .NET Core Test Driven Development
- Scala編程(第5版)
- 深入解析Java編譯器:源碼剖析與實例詳解
- 安卓工程師教你玩轉Android
- Learning Cocos2d-JS Game Development
- Getting Started with Web Components
- Bitcoin Essentials
- R語言數據分析從入門到實戰
- Visual C++程序開發范例寶典