tailieunhanh - Ajax in Action phần 2

Mỗi phần tử trong một trang HTML có thể được theo kiểu trong một số cách khác nhau. Các yếu tố chung nhất, chẳng hạn như thẻ tag, có thể có hàng chục stylings áp dụng cho họ. Hãy xem một thời gian ngắn ở một vài trong số các. | Defining look and feel using CSS 39 CSS style properties Every element in an HTML page can be styled in a number of ways. The most generic elements such as the DIV tag can have dozens of stylings applied to them. Let s look briefly at a few of these. The text of an element can be styled in terms of the color the font size the heaviness of the font and the typeface to use. Multiple options can be specified for fonts to allow graceful degradation in situations where a desired font is not installed on a client machine. To style a paragraph in gray terminal-style text we could define a styling .robotic font-size 14pt font-family courier new courier monospace font-weight bold color gray Or more concisely we could amalgamate the font elements .robotic font bold 14pt courier new courier monospace color gray In either case the multiple styling properties are written in a key-value pair notation separated by semicolons. CSS can define the layout and size often referred to as the box-model of an element by specifying margins and padding elements either for all four sides or for each side individually .padded padding 4px .eccentricPadded padding-bottom 8px padding-top 2px padding-left 2px padding-right 16px margin 1px The dimensions of an element can be specified by the width and height properties. The position of an element can be specified as either absolute or relative. Absolutely positioned elements can be positioned on the page by setting the top and left properties whereas relatively positioned elements will flow with the rest of the page. Licensed to Jonathan zheng yiyisjun@ 40 CHAPTER 2 First steps with Ajax Background colors can be set to elements using the background-color property. In addition a background image can be set using the background-image property .titlebar background-image url images Elements can be hidden from view by setting either visibility hidden or display none. In the former case the item will still occupy space on the .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.