TAILIEUCHUNG - javascript bible 4th edition jsb gold chapters phần 6

Có rất ít mã trong Ví dụ 31-19 bởi vì nó chỉ đơn giản là điều chỉnh phong cách. khả năng hiển thị tài sản của một lớp bên ngoài và một lớp bên trong lồng nhau. Bạn có thể thấy rằng khi tải trang, | Chapter 31 Positioned Objects CD-245 DIV ID outerDisplay STYLE position absolute top 150 left 250 width 370 height 190 background-color coral P B Placeholder text for layer. B P DIV IFRAME ID hiddenContent STYLE visibility hidden onLoad transferHTML IFRAME BODY HTML Positioned element visibility behavior There is very little code in Listing 31-19 because it simply adjusts the style. visibility property of an outer layer and a nested inner layer. You can see that when the page loads the green inner layer s visibility is automatically set to inherit the visibility of its containing outer layer. When you click the outer layer buttons the inner layer blindly follows the settings. Things change however once you start adjusting the properties of the inner layer independently of the outer layer. With the outer layer hidden you can show the inner layer. Only by setting the visibility property of the inner layer to inherit can you make it rejoin the outer layer in its behavior. Listing 31-19 Nested Layer Visibility Relationships W3C HTML HEAD TITLE W3C TITLE SCRIPT LANGUAGE JavaScript function setOuterVis type outerDisplay . type function setInnerVis type innerDisplay . type SCRIPT HEAD BODY H1 Setting the TT TT Property of Nested Layers W3C H1 HR Click the buttons to see what happens when you change the visibility of the FONT COLOR coral outer layer FONT and FONT COLOR aquamarine inner layer FONT objects. P DIV STYLE position absolute top 150 width 180 background-color coral FORM Control outer layer property BR Continued CD-246 Part III Document Objects Reference Listing 31-19 continued INPUT TYPE button VALUE Hide Outer Layer onClick setOuterVis hidden BR INPUT TYPE button VALUE Show Outer Layer onClick setOuterVis visible BR FORM DIV DIV STYLE position absolute top 270 width 180 background-color aquamarine FORM Control inner layer property BR .

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.