TAILIEUCHUNG - Pro JavaScript Techniques phần 7

và những người không thích sử dụng một con chuột. Ngồi xuống một ngày, ngăt kêt nôi chuột của bạn từ máy tính của bạn, và tìm hiểu làm thế nào để điều hướng web bằng cách sử dụng chỉ có một con chuột một mắt mở thực sự kinh nghiệm | 208 CHAPTER 9 BUILDING AN IMAGE GALLERY Listing 9-14. Figuring Out When the Next and Previous Navigational Links Should Be Hidden or Revealed Hide the next link if we re at the end of the slideshow if next cur hide id gallery_next Otherwise make sure that it s visible else show id gallery_next Hide the previous link if we re at the start of the slideshow if prev cur hide id gallery_prev Otherwise we need to be sure that it s visible else show id gallery_prev Finally Listing 9-15 shows the CSS styling necessary to position the navigational links in their correct positions. Listing 9-15. The CSS for Positioning the Navigational Links gallery_prev gallery_next position absolute bottom 0px right 0px z-index 120 width 60px text-align center font-size 12px padding 4px gallery_prev left 0px gallery_prev a gallery_next a color 000 text-decoration none An example of the navigation in use is shown in Figure 9-5. Notice that at the bottom of the image gallery there is a link directing the user to visit the next image in the gallery. The link is hidden and shown appropriately based on where the user currently is in the gallery. CHAPTER 9 BUILDING AN IMAGE GALLERY 209 Slideshow The final piece of your image gallery is a nice touch that many users will enjoy a dynamic graceful slideshow of all the images in the gallery. This particular addition is fairly simple to add in considering the amount of previous navigational work. Quite simply the process of creating a slideshow is broken down into two steps 1. Create an additional link in the document for the user to click to start the slideshow. 2. Build the slideshow process itself which controls which images to display and when to switch between them . The first step is shown in Listing 9-16. Listing 9-16. Adding Additional Navigation to the DOM for the User to Initalize the Slideshow function addSlideshow elem We re going to create some extra contextual information surrounding the slideshow Create the slideshow header wrapper var

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.