TAILIEUCHUNG - HTML cơ bản - p 20

174 Chapter 3: Elements of Style Example : disappearing an element by using the display property (continued) Something is missing. The following sentence is false. The previous sentence is true. Figure shows how this code is displayed in two browser windows. In the window on the right, the mouse is on the link, and the mouse button is held down, causing the first paragraph to disappear. Figure : Changing the display property of a sibling element using the :active pseudo-class Changing an element’s display property from block to none has the effect of making it look as if the element never. | 174 Chapter 3 Elements of Style Example Disappearing an element by using the display property continued head body a href Something is missing. a p The following sentence is false. p p The previous sentence is true. p body html Figure shows how this code is displayed in two browser windows. In the window on the right the mouse is on the link and the mouse button is held down causing the first paragraph to disappear. Figure Changing the display property of a sibling element using the active pseudo-class Changing an element s di spl ay property from bl ock to none has the effect of making it look as if the element never existed on the page. The content following the element is moved up to occupy the space the element once occupied. Of course the element still exists and can be accessed by scripting methods. If the visibility property were used in Example instead a active p visibility hidden the paragraph after the link still disappears but the space it occupied remains. The final paragraph does not move up to take its place. Setting a block element s display property to the value inline-block instructs the browser to treat the element the same way an inline image is treated. The element loses its margins to become part of the content flow of its parent element but keeps its other box properties including height width padding and From the Library of Wow eBook Other CSS Properties 175 borders. If the inline-block element is embedded in text a browser aligns the baseline of its bottom line of text with the baseline of the parent s text. Example illustrates this relationship. Example HTML and CSS coding for inline-block elements DOCTYPE html html head title Example title style type text css faq display inline-block border thin dotted padding 1px font bold small sans-serif faq position relative bottom -1em style head body div id faq The reason that the numbers on a keyboard are arranged p class pad 7 8 9 br 4 5 6 br 1 2 3 p .

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.