A lightbox for displaying images can be created easily by placing an image in a popup. In this example, a close button is added to the markup by adding a link. The
data-overlay-theme="b"
attribute adds a dark backdrop behind the photos. For advanced photo techniques, see scaling images in popups.1 2 3 4 5 6 7 8 9 10 11 12 | < a href = "#popupParis" data-rel = "popup" data-position-to = "window" data-transition = "fade" >< img class = "popphoto" src = "../_assets/img/paris.jpg" alt = "Paris, France" style = "width:30%" ></ a > < a href = "#popupSydney" data-rel = "popup" data-position-to = "window" data-transition = "fade" >< img class = "popphoto" src = "../_assets/img/sydney.jpg" alt = "Sydney, Australia" style = "width:30%" ></ a > < a href = "#popupNYC" data-rel = "popup" data-position-to = "window" data-transition = "fade" >< img class = "popphoto" src = "../_assets/img/newyork.jpg" alt = "New York, USA" style = "width:30%" ></ a > < div data-role = "popup" id = "popupParis" data-overlay-theme = "b" data-theme = "b" data-corners = "false" > < a href = "#" data-rel = "back" class = "ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right" >Close</ a >< img class = "popphoto" src = "../_assets/img/paris.jpg" style = "max-height:512px;" alt = "Paris, France" > </ div > < div data-role = "popup" id = "popupSydney" data-overlay-theme = "b" data-theme = "b" data-corners = "false" > < a href = "#" data-rel = "back" class = "ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right" >Close</ a >< img class = "popphoto" src = "../_assets/img/sydney.jpg" style = "max-height:512px;" alt = "Sydney, Australia" > </ div > < div data-role = "popup" id = "popupNYC" data-overlay-theme = "b" data-theme = "b" data-corners = "false" > < a href = "#" data-rel = "back" class = "ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right" >Close</ a >< img class = "popphoto" src = "../_assets/img/newyork.jpg" style = "max-height:512px;" alt = "New York, USA" > </ div > |
Comments
Post a Comment