Learning XML phần 5

Điều này là chấp nhận được trong HTML bởi vì không có sự mơ hồ về các yếu tố. HTML không cho phép cư trú bên trong khác, do đó, nó rõ ràng rằng hai người là anh chị em. Tất cả các phân tích cú pháp HTML có kiến thức dựng sẵn của HTML, được gọi là một ngữ pháp. Trong XML, ngữ pháp không được thiết lập trong đá, mơ hồ có thể kết quả: | Learning XML In HTML every element has an implicit value for its display property. The p element is always a block while tt is an inline. In stylesheets for HTML documents you will rarely see the display property used in declarations. Some elements won t have rules because the implicit display setting is enough. In the absence of an implicit or explicit display property setting a general-purpose XML processor has to guess at what setting to use. It may pick inline which will run all the text together in a giant paragraph. The result won t be pretty so for XML applications you may want to declare the display property for every element. Properties for Block Elements Every block has an invisible box that shapes its content keeps it a healthy distance from its neighbors and defines a canvas on which to paint. Figure shows all the parts of this box model. Immediately surrounding the content of the block is a rectangular buffer of space called the bounding box. Its distance from the content is known as padding. The perimeter of this region called the boundary is sometimes displayed as a rule or border on one two three or all four sides. The thickness of these rules is measured outward. Outside the boundary is another envelope of space defined by four widths called margins. Figure The CSS box model This IS some text inside block- This is some text inside Ũ block. Ĩhiỉiĩsome tex inside 0 block A block s boundaries hold content while separating the block from sibling blocks. Any background image or color is confined to the area within the boundary while text and nested boxes are confined to an even smaller area the rectangle determined by boundary minus padding. If the boundary is not displayed the padding is often set to zero. Margins demarcate a rectangular region outside the box that keeps other boxes away. page 106 Learning XML Margins A common way to adjust space around an element is to set its margins. A margin is the distance between the .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
8    59    2    23-04-2024
Đã 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.