TAILIEUCHUNG - HTML cơ bản - p 15

124 Chapter 3: Elements of Style input[type="text"] { background-color: #ffff99; } input elements exist within interactive forms (see Chapter 2, “The HTML Language”) and come in a variety of types, including checkboxes, radio buttons, and text fields. The preceding CSS statement provides a light yellow background color to input text fields like this: Pseudo-Classes and Pseudo-Elements Pseudo-classes extend the capability of CSS statements to select HTML elements based on certain states or circumstances. Pseudo-elements allow for the selection of specific parts of a document element, such as its first line of text. The pseudo-class or pseudo-element name is appended to the rest of. | 124 Chapter 3 Elements of StyLE input type text background-color ffff99 input elements exist within interactive forms see Chapter 2 The HTML Language and come in a variety of types including checkboxes radio buttons and text fields. The preceding CSS statement provides a light yellow background color to input text fields like this input type text size 32 Pseudo-Classes and Pseudo-Elements Pseudo-classes extend the capability of CSS statements to select HTML elements based on certain states or circumstances. Pseudo-elements allow for the selection of specific parts of a document element such as its first line of text. The pseudo-class or pseudo-element name is appended to the rest of the selection expression separated by a colon . The most common use of pseudo-classes is to detect and style the various states of links created by anchor elements. For example the following four CSS statements set the colors of hyperlinked text depending on whether the link is in its normal state whether the mouse is hovering over the link whether the link is active hover and hold down the mouse button and whether the link is in the visited state a link color blue a hover color green a active color red a visited color purple Because these four link states are mutually exclusive and represent all the possible states of a hypertext link it is usually not necessary to specify the link state. In other words the first statement just shown could be written as a color blue with the same result. The link pseudo-class is included to enable authors to overwrite previously set CSS rules for the same element. Modern browsers permit all elements to have the hover state not just links created by the anchor In theory other elements can have link active and visited states. But this is not defined in CSS and browser manufacturers might or might not implement such features. 3. Currently Internet Explorer version 6 is the only browser with significant market share that recognizes the hover .

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.