TAILIEUCHUNG - CSS Web Design For Dummies- P3

Tham khảo tài liệu 'css web design for dummies- p3', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 82 Part II Looking Good with CSS Figure 4-8 This sidebar is positioned on top of the maintext div thanks to a high z-index value. Combining Stacking with Translucence Now try a cool trick that combines stacking with opacity adjustments. It s useful for all kinds of design effects and is particularly dramatic when used with scripting that animates the opacity or positioning of the elements dynamically. This kind of animation can be quite compelling when used correctly. This example adjusts the sample code you ve been using throughout this chapter but causes the sidebar element to show through the maintext element. CSS3 is working to incorporate an opacity property in some future spec but why wait IE and later supports an opacity feature you can use right now. How about some stacking combined with blending of elements Take a look at Figure 4-9. In Figure 4-9 the sidebar is defined as having a lower z-index than the maintext div. The sidebar has a z-index of 1 and the maintext has a z-index of 2 therefore the maintext is superimposed on top of the sidebar. However the sidebar shows through because the maintext is made somewhat transparent by giving it an opacity value of 60. An opacity value of 0 makes an element fully transparent a value of 100 makes it fully opaque. fiiter progid opacity 60 team Line - live informative Non-cost and Genuine __Chapter 4 Taking a Position 83 Figure 4-9 Combine positioning z-index and opacity to create many cool effects. Here s the complete code that produces Figure 4-9. Note This code assumes that you have a graphic file with a sandstone texture called in the same folder on your hard drive as the .htm file. If you don t substitute another texture in a graphics file for the background but name it so that the following code will work. html head style position absolute z-index 1 backgroundcolor cornflowerblue top

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.