HTML CSS Reference/HTML Tag Reference/div
Содержание
- 1 "div" CSS Attributes and JavaScript Style Properties
- 2 "div" Event Handlers
- 3 "div" Example
- 4 "div" HTML Attributes
- 5 "div" JavaScript Collections
- 6 "div" JavaScript Methods
- 7 "div" JavaScript Objects
- 8 "div" JavaScript Properties
- 9 "div" Microsoft Behaviors
- 10 "div" Microsoft Filters
- 11 "div" Syntax and Note
"div" CSS Attributes and JavaScript Style Properties
Names noted with an asterisk (*) are JavaScript properties only.
+----------------+--------------------------------------------------------------+
| CSS |!important :first-letter |
| Attributes |:first-line accelerator |
| and |background background-attachment |
| JavaScript |background-color background-image |
| Style |background-position background-position-x |
| Properties |background-position-y background-repeat |
| |behavior border |
| |border-bottom border-bottom-color |
| |border-bottom-style border-bottom-width |
| |border-color border-left |
| |border-left-color border-left-style |
| |border-left-width border-right |
| |border-right-color border-right-style |
| |border-right-width border-style |
| |border-top border-top-color |
| |border-top-style border-top-width |
| |border-width bottom |
| |clear clip |
| |color cursor |
| |direction display |
| |filter float |
| |font font-family |
| |font-size font-style |
| |font-variant font-weight |
| |hasLayout(*) height |
| |layout-flow layout-grid |
| |layout-grid-char layout-grid-line |
| |layout-grid-mode layout-grid-type |
| |left letter-spacing |
| |line-break line-height |
| |margin margin-bottom |
| |margin-left margin-right |
| |margin-top overflow |
| |overflow-x overflow-y |
| |padding padding-bottom |
| |padding-left padding-right |
| |padding-top page-break-after |
| |page-break-before pixelBottom(*) |
| |pixelHeight(*) pixelLeft(*) |
| |pixelRight(*) pixelTop(*) |
| |pixelWidth(*) posBottom(*) |
| |posHeight(*) position |
| |posLeft(*) posRight(*) |
| |posTop(*) posWidth(*) |
| |right scrollbar-3dlight-color |
| |scrollbar-arrow-color scrollbar-base-color |
| |scrollbar-darkshadow-color scrollbar-face-color |
| |scrollbar-highlight-color scrollbar-shadow-color |
| |scrollbar-track-color styleFloat(*) |
| |text-align text-align-last |
| |text-autospace text-decoration |
| |text-indent text-justify |
| |text-kashida-space text-overflow |
| |text-transform text-underline-position |
| |textDecorationBlink(*) textDecorationLineThrough(*) |
| |textDecorationNone(*) textDecorationOverline(*) |
| |textDecorationUnderline(*) top |
| |unicode-bidi visibility |
| |white-space width |
| |word-break word-spacing |
| |word-wrap writing-mode |
| |z-index zoom |
+----------------+--------------------------------------------------------------+
"div" Event Handlers
+----------------+--------------------------------------------------------------+
| Event |onActivate onAfterUpdate |
| Handlers |onBeforeActivate onBeforeCopy |
| |onBeforeCut onBeforeDeactivate |
| |onBeforeEditFocus onBeforePaste |
| |onBeforeUpdate onBlur |
| |onClick onContextMenu |
| |onControlSelect onCopy |
| |onCut onDblClick |
| |onDeactivate onDrag |
| |onDragEnd onDragEnter |
| |onDragLeave onDragOver |
| |onDragStart onDrop |
| |onErrorUpdate onFilterChange |
| |onFocus onFocusIn |
| |onFocusOut onHelp |
| |onKeyDown onKeyPress |
| |onKeyUp onLayoutComplete |
| |onLoseCapture onMouseDown |
| |onMouseEnter onMouseLeave |
| |onMouseMove onMouseOut |
| |onMouseOver onMouseUp |
| |onMouseWheel onMove |
| |onMoveEnd onMoveStart |
| |onPaste onPropertyChange |
| |onReadyStateChange onResize |
| |onResizeEnd onResizeStart |
| |onScroll onSelectStart |
| |onTimeError |
+----------------+--------------------------------------------------------------+
"div" Example
<html>
<head>
<title>div element example</title>
</head>
<body>
<div id="Layer1" style="position:absolute;
visibility:visible;
width:300px;
height:294px;
background-color:#FFFFCC;
layer-backgroundcolor:#FFFFCC;
border:1px none #000000;
z-index:1">
<p><img src="yourImage.jpg" alt="" width="300" height="225"></p>
<p align="center">This div element contains an image plus a center aligned text.</p>
</div>
<div id="Layer2" style="position:absolute;
visibility:visible;
width:315px;
height:174px;
background-color:#EEEEEE;
layer-background-color:#CCFFCC;
border:1px none #000000;
z-index:2">
<p>Text.</p>
</div>
</body>
</html>
"div" HTML Attributes
+----------------+--------------------------------------------------------------+
| HTML |accesskey align |
| Attributes |begin class |
| |contenteditable datafld |
| |dataformatas datasrc |
| |dir disabled |
| |end hidefocus |
| |id lang |
| |language nowrap |
| |style syncmaster |
| |systemBitrate systemCaptions |
| |systemLanguage systemOverdubOrSubtitle |
| |tabindex timecontainer |
| |title unselectable |
+----------------+--------------------------------------------------------------+
"div" JavaScript Collections
+----------------+--------------------------------------------------------------+
| JavaScript |all attributes |
| Collections |behaviorUrns childNodes |
| |children filters |
+----------------+--------------------------------------------------------------+
"div" JavaScript Methods
+----------------+--------------------------------------------------------------+
| JavaScript |addBehavior appendChild |
| Methods |applyElement attachEvent |
| |blur clearAttributes |
| |click cloneNode |
| |componentFromPoint contains |
| |detachEvent doScroll |
| |dragDrop fireEvent |
| |getAdjacentText getAttribute |
| |getAttributeNode getBoundingClientRect |
| |getClientRects getElementsByTagName |
| |getExpression hasChildNodes |
| |insertAdjacentElement insertAdjacentHTML |
| |insertAdjacentText insertBefore |
| |mergeAttributes normalize |
| |releaseCapture removeAttribute |
| |removeAttributeNode removeBehavior |
| |removeChild removeExpression |
| |removeNode replaceAdjacentText |
| |replaceChild replaceNode |
| |scrollIntoView setActive |
| |setAttribute setAttributeNode |
| |setCapture setExpression |
| |swapNode |
+----------------+--------------------------------------------------------------+
"div" JavaScript Objects
+----------------+--------------------------------------------------------------+
| JavaScript |currentStyle runtimeStyle |
| Objects |style |
+----------------+--------------------------------------------------------------+
"div" JavaScript Properties
+----------------+--------------------------------------------------------------+
| JavaScript |accessKey align |
| Properties |blockDirection canHaveChildren |
| |canHaveHTML className |
| |clientHeight clientLeft |
| |clientTop clientWidth |
| |contentEditable cursor |
| |dataFld dataFormatAs |
| |datasrc dir |
| |disabled end |
| |firstChild hasLayout |
| |hideFocus id |
| |innerHTML innerText |
| |isContentEditable isDisabled |
| |isMultiLine isTextEdit |
| |lang language |
| |lastChild nextSibling |
| |nodeName nodeType |
| |nodeValue noWrap |
| |offsetHeight offsetLeft |
| |offsetParent offsetTop |
| |offsetWidth outerHTML |
| |outerText ownerDocument |
| |parentElement parentNode |
| |parentTextEdit previousSibling |
| |readyState recordNumber |
| |scopeName scrollHeight |
| |scrollLeft scrollTop |
| |scrollWidth sourceIndex |
| |tabIndex tagName |
| |tagUrn title |
| |uniqueID |
+----------------+--------------------------------------------------------------+
"div" Microsoft Behaviors
+----------------+--------------------------------------------------------------+
| Microsoft |clientCaps download |
| Behaviors |homePage httpFolder |
| |saveFavorite saveHistory |
| |saveSnapshot time |
| |time2 userData |
+----------------+--------------------------------------------------------------+
"div" Microsoft Filters
+----------------+--------------------------------------------------------------+
| Microsoft |Alpha Barn |
| Filters |BasicImage BlendTrans |
| |Blinds Blur |
| |CheckerBoard Chroma |
| |Compositor DropShadow |
| |Emboss Engrave |
| |Fade FlipH |
| |FlipV Glow |
| |GradientWipe Gray |
| |ICMFilter Inset |
| |Invert Iris |
| |Light MaskFilter |
| |Matrix MotionBlur |
| |Pixelate RadialWipe |
| |RandomBars RandomDissolve |
| |RevealTrans Shadow |
| |Slide Spiral |
| |Stretch Strips |
| |Wave Wheel |
| |Xray Zigzag |
+----------------+--------------------------------------------------------------+
"div" Syntax and Note
Note:
Group elements.
This element can act as a layer which makes the <layer> element obsolete
for versions of NN4+ and IE.
The <div> element causes a line space before and after the contents.
<layer> and <ilayer> would still be required to maintain compatibility with those
browsers when using event handlers.
Syntax:
<div attributes events> . . . </div>