TAILIEUCHUNG - Beginning XML with DOM and Ajax From Novice to Professional phần 5

đặt mã JavaScript trong mộtyếu tố để nó không phải là giải thích như XHTML trình duyệt. JavaScript có thể bao gồm các ký tự mà nếu không gây ra các tài liệu không đạt yêu cầu kiểm tra tốt được hình thành. Thay vì sử dụng đoạn mã sau | CHAPTER 5 DISPLAYING XML USING CSS 161 CSS2 includes the concept of pseudo-elements that allow you to add content when styling XML documents. These elements are before which inserts content before an element and after which inserts the content afterward. Using these pseudo-elements you can add text and images before any element in the source document. You can also use two additional pseudo-elements to add different effects to the first line or first letter of some text. These are first-line which adds special styles to the first line of the text in a selector and first-letter which does the same to the first letter of the selector. The syntax for all pseudo-elements is selector psuedo-element property value Let s work through an example to see how these pseudo-elements might apply. The XML document includes four paragraphs containing text. The elements are imaginatively called paragraph1 paragraph2 paragraph3 and paragraph4 document page paragraph1 This content is paragraph2 This content is paragraph3 This content is paragraph4 This content is page document within paragraph 1 paragraph1 within paragraph 2 paragraph2 within paragraph 3 paragraph3 within paragraph 4 paragraph4 In this example the stylesheet associates different pseudo-elements with each paragraph. The CSS required to style the first paragraph follows paragraph1 first-letter float left font-size 24pt font-style italic font-weight bold padding-right 4px Unfortunately none of the major browsers support the first-letter pseudo-selector so the page doesn t display properly. The style declaration for the second paragraph uses the following to display the entire line in uppercase paragraph2 first-line text-transform uppercase font-weight bold Again none of the major browsers support this pseudo-selector. In the third paragraph the stylesheet inserts some text before the paragraph. The text to be added is placed in quotes as the value of the content property. This time the example works in .

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.