JavaScript Bible, Gold Edition part 97 potx

10 193 0
JavaScript Bible, Gold Edition part 97 potx

Đang tải... (xem toàn văn)

Thông tin tài liệu

808 Part III ✦ Document Objects Reference textDecorationBlink textDecorationLineThrough textDecorationNone textDecorationOverline textDecorationUnderline IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 — No Controls: Individual text decoration characteristics for text, allowing for multiple decorations to be applied to the same text. Value: Boolean (not strings) true | false Example: elementRef.style.textDecorationUnderline = true textIndent IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: Amount of indentation for the first line of a block text element (e.g., P). Value: Length (negative values for outdenting); percentage (relative to inherited value) Example: elementRef.style.textIndent = “2.5em” textJustify IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 5 — No Controls: Additional detailed specifications for an element whose textAlign property is set to justify. Value: Constant auto | distribute | distribute-all-lines | distribute- center-last | inter-cluster | inter-ideograph | inter-word | kashida | newspaper Example: elementRef.style.textJustify = “distribute” elementRef.style.textJustify 809 Chapter 30 ✦ Style Sheet and Style Objects textJustifyTrim IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 5 — No Reserved for future use. textKashidaSpace IE/Windows IE/Mac NN W3C CSS2 Compatibility 5.5 —— No Controls: Ratio of kashida expansion to white space expansion for Arabic writing systems. Value: Percentage Example: elementRef.style.textKashidaSpace = “90%” textShadow IE/Windows IE/Mac NN W3C CSS2 Compatibility — 56 Yes Controls: Shadow rendering around text characters. Note: The style attribute for this property is not implemented in IE5/Mac or NN6, but the property is listed as valid for a style object. Value: Each shadow specification consists of an optional color and three space- delimited length values (horizontal shadow offset, vertical shadow offset, blur radius length). Multiple shadow specifications are comma-delimited. textTransform IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: Case rendering of the text (meaning without altering the case of the original text). elementRef.style.textTransform 810 Part III ✦ Document Objects Reference Value: Constant none | capitalize | lowercase | uppercase Example: elementRef.style.textTransform = “uppercase” textUnderlinePosition IE/Windows IE/Mac NN W3C CSS2 Compatibility 5.5 —— No Controls: Whether an underline text decoration is displayed above or below the text. Seems redundant with textDecorationUnderline and textDecorationOverline. Value: Constant above | below Example: elementRef.style.textUnderlinePosition = “above” unicodeBidi IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 5 6 Yes Controls: Within bi-directional text (for example, English and Arabic), to what extent an alternate direction text block is embedded within the outer element. Value: Constant normal | embed | bidi-override Example: elementRef.style.unicodeBidi = “embed” whiteSpace IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: Treatment of white space characters within an element’s source code. Value: Constant normal | nowrap | pre Example: elementRef.style.whiteSpace = “nowrap” elementRef.style.whiteSpace 811 Chapter 30 ✦ Style Sheet and Style Objects wordBreak IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 —— No Controls: Word breaking characteristics, primarily for Asian-language text or text containing a mixture of Asian and Latin characters. Value: Constant normal | break-all | keep-all Example: elementRef.style.wordBreak = “break-all” wordSpacing IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: Spacing between words. Value: Length (usually in em units); Constant normal Example: elementRef.style.wordSpacing = “1em” wordWrap IE/Windows IE/Mac NN W3C CSS2 Compatibility 5.5 —— No Controls: Word wrapping characteristics of text in a block element, explicitly sized inline element, or positioned element. Value: Constant normal | break-word Example: elementRef.style.wordWrap = “break-word” writingMode IE/Windows IE/Mac NN W3C CSS2 Compatibility 5.5 —— No elementRef.style.writingMode 812 Part III ✦ Document Objects Reference Controls: Direction of content flow (left-to-right/top-to-bottom or top-to- bottom/right-to-left, as in some Asian languages). Value: Constant lr-tb | tb-rl Example: elementRef.style.writingMode = “tb-rl” Inline display and layout properties clear IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: Layout orientation of an element with respect to a neighboring floating element. Value: Constant both | left | none | right Example: elementRef.style.clear = “right” clip IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: The clipping rectangle of an element (that is, the position of the rectangle through which the user sees an element’s content). Value: rect(topLength, rightLength, bottomLength, leftLength) | auto Example: elementRef.style.clip = “rect(10px, 300px, 200px, 0px)” clipBottom clipLeft clipRight clipTop IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 —— No elementRef.style.clipBottom 813 Chapter 30 ✦ Style Sheet and Style Objects Controls: Individual edges of the clipping rectangle of an element. These properties are read-only properties of the currentStyle object. Value: Length | auto Example: var leftEdge = elementRef.currentStyle.clipLeft content IE/Windows IE/Mac NN W3C CSS2 Compatibility — 56 Yes Controls: The content rendered by an element. Note: The style attribute for this property is not implemented in IE5/Mac or NN6, but the property is listed as valid for a style object. Value: See http://www.w3.org/TR/REC-CSS2/generate.html#propdef-content. counterIncrement IE/Windows IE/Mac NN W3C CSS2 Compatibility — 56 Yes Controls: The jumps in counter values to be displayed via the content style property. Note: The style attribute for this property is not implemented in IE5/Mac or NN6, but the property is listed as valid for a style object. Value: One or more pairs of counter identifier and integers. counterReset IE/Windows IE/Mac NN W3C CSS2 Compatibility — 56 Yes Controls: Resets a named counter for content to be displayed via the content style property. Note: The style attribute for this property is not implemented in IE5/Mac or NN6, but the property is listed as valid for a style object. Value: One or more pairs of counter identifier and integers. elementRef.style.counterReset 814 Part III ✦ Document Objects Reference cssFloat IE/Windows IE/Mac NN W3C CSS2 Compatibility — 56 Yes Controls: Horizontal alignment of an element that allows other content to wrap around the element (usually text wrapping around an image). Corresponds to the CSS float style attribute. See also the floatStyle property, below. Floating (non- positioned) elements follow a long sequence of rules for their behavior, detailed at http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-float. Value: Constant left | right | none Example: elementRef.style.cssFloat = “right” cursor IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: The icon used for the cursor on the screen from a library of system- generated cursors. The CSS2 specification defines syntax for downloadable cursors, but this feature is not implemented as of IE5.5 or NN6. Value: Constant auto | crosshair | default | e-resize | help | move | n-resize | ne-resize | nw-resize | pointer | s-resize | se-resize | sw-resize | text | w-resize | wait Example: elementRef.style.cursor = “hand” direction IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 5 6 Yes Controls: Layout direction (left-to-right or right-to-left) of inline text (same as DIR attribute of an element). Value: Constant ltr | rtl Example: elementRef.style.direction = “rtl” elementRef.style.direction 815 Chapter 30 ✦ Style Sheet and Style Objects display IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 6 Yes Controls: Whether an element is displayed on the page. Content surrounding an undisplayed element cinches up to occupy the undisplayed element’s space — as if the element didn’t exist for rendering purposes (see the visibility property for a different approach). Commonly used to hide or show segments of a graphical tree structure. Also used to direct the browser to display an element as inline or block-level element. Some special-purpose values are associated with specific element types (for example, lists, table cells, and so on). Value: Constant block | compact | inline | inline-table | list-item | none | run-in | table | table-caption | table-cell | table-column-group | table-footer-group | table-header-group | table-row | table-row-group Example: elementRef.style.display = “none” // removes element from page filter IE/Windows IE/Mac NN W3C CSS2 Compatibility 4 4 — No Controls: Rendering effects on static content and on transitions between hiding and showing elements. Microsoft made a massive overhaul of the filter style sheet syntax for IE5.5/Windows (using the DXImageTransform ActiveX control). A handy online utility lets you preview the filter results and provides copy-and-paste code you can use to start adding filters and scripted control of filters to your pages. See http://msdn.microsoft.com/workshop/samples/author/dhtml/ DXTidemo/DXTidemo.htm. Scripting transitions require several steps to load the transition and actions before playing the transition. Use style.filter to read or write the entire filter specification string; use the elem.styles[i] object to access individual filter properties. See discussion of the filter object later in this chapter. Value: Filter specification as string. Example: var filterSpec = elementRef.style.filter =“alpha(opacity=50) flipH()” elementRef.style.filter 816 Part III ✦ Document Objects Reference floatStyle IE/Windows IE/Mac NN W3C CSS2 Compatibility — 4 — Yes Controls: Horizontal alignment of an element that allows other content to wrap around the element (usually text wrapping around an image). Corresponds to the CSS float style attribute. See also the cssFloat property, above. Floating (non- positioned) elements follow a long sequence of rules for their behavior, detailed at http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-float. Value: Constant left | right | none Example: elementRef.style.floatStyle = “right” layoutGrid IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 —— No Controls: Page grid properties (primarily for Asian-language pages). Value: Combination values: layoutGridMode || layoutGridType || layoutGridLine || layoutGridChar. See individual properties for their value formats. Example: elementRef.style.layoutGrid = “2em strict” layoutGridChar IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 —— No Controls: Size of the character grid (Asian languages). Value: Length; Percentage; Constant none | auto Example: elementRef.style.layoutGridChar = “2em” elementRef.style.layoutGridChar 817 Chapter 30 ✦ Style Sheet and Style Objects layoutGridLine IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 —— No Controls: Line height of the grid (Asian languages). Value: Value: Length; Percentage; Constant none | auto Example: elementRef.style.layoutGridLine = “110%” layoutGridMode IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 —— No Controls: One- or two-dimensional grid (Asian languages). Value: Constant both | none | line | char Example: elementRef.style.layoutGridMode = “both” layoutGridType IE/Windows IE/Mac NN W3C CSS2 Compatibility 5 —— No Controls: Type of grid for text content (Asian languages). Value: Constant loose | strict | fixed Example: elementRef.style.layoutGridType = “strict” markerOffset IE/Windows IE/Mac NN W3C CSS2 Compatibility — 56 Yes elementRef.style.markerOffset . 808 Part III ✦ Document Objects Reference textDecorationBlink textDecorationLineThrough textDecorationNone textDecorationOverline textDecorationUnderline IE/Windows. text (meaning without altering the case of the original text). elementRef.style.textTransform 810 Part III ✦ Document Objects Reference Value: Constant none | capitalize | lowercase | uppercase Example:. “break-word” writingMode IE/Windows IE/Mac NN W3C CSS2 Compatibility 5.5 —— No elementRef.style.writingMode 812 Part III ✦ Document Objects Reference Controls: Direction of content flow (left-to-right/top-to-bottom

Ngày đăng: 06/07/2014, 06:20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan