CSS, jquery selector syntax are similar, because of the use of a few, some selectors are often confused or forgotten, so here to understand the record under:1. Descendant element Selector ( ancestor descendant ), child element selector ( parent > Children)The same HTML code: form > name= "Son"> fieldset> name= "grandson"> fieldset >form>Descendant selector: . UL Li , can be selected to get descendants of descendant elements: [ inp
Many CSS beginners in the CSS inline elements and CSS block-level elements, it may be easy to confuse, then, this article will explain to you CSS inline elements and block-level elements of what? and the difference between CSS block-level elements and CSS inline
difference. For example, we can completely add an inline element cite to a property such as Display:block, so that he also has properties that start from the new line each time.The basic concept of a mutable element is that he needs to determine whether the element is a block element or an inline element based on the context relationship. Mutable elements are also part of the above two categories of elements
classification, see the full text.
AboutInline element)Has a variety of inline elements, embedded elements, line elements, straight forward elements. Basically, there is no unified translation. What do you call love.When we mention inline elements, we will think of a displa
currently matched set of elements.We use this code to understand the meaning of this sentence more clearly:$ ("#main"). Find ('. List ') // selector filter var $span = $ (' span '); $ (' #main '). Find ($ span); // jquery Object Filtering var span = $ (' span ') [0];$ (' #main '). Find (span) // DOM element filteringWe can see from the above code that there are three ways to get the corresponding e
")
————————————————————————— 2013 3-4 ————————————————————— One, get the parent element1. Parent ([expr]):
Gets all the parent elements of the specified element
$ (document). Ready (function () {$ ("a"). Parent (). addclass (' A_par ');});Firebug View jquery Parent Effect
Second, get the sibling elements:1. Next ([expr]):Gets the next sibling element of the specified element (note that the next sibling
-Paragraph
Pre-formatted text
Table-Tables
UL-Non-sorted list
Inline elements (inline element)
A-anchor point
ABBR-Abbreviation
Acronym-the first word
B-Bold (not recommended)
Bdo-bidi Override
Big-Large font
BR-line break
Cite-citation
Code-Computer codes (required when referencing source)
DFN-Defining
block element block-level elements > As the name implies is the element displayed as a block, height width is a that can be set. For example, our commonly used inline element inline elements , and its width is the width of its own text or picture. The As defined in the CSS authoritative guide, "any visible element that is not a block-level element is an inline element, and its performance
One or three large instruction elements: 1. Page directive 2. Include directive 3. Taglib instruction two or seven Big Bang element: 1. Forward Action 2. Include Action 3. Param Action 4. Plugin action 5. Usebean Action 6. SetProperty Action 7. GetProperty action three or three large script element: 1. Statement 2. Script 3. An expressionAbove to write about, specifically to be continued ...JSP three major instruction
The difference between block elements and inline elements.
Only one row can set the margin in the width, height, and vertical direction, and the margin and padding in the horizontal direction of padding.
Block Element: Yes, yes, yes
Inline element: No, no
Question: Change the nine days of the next poem to a red font.
The sunshine incense burner produces Ziyan, And the waterfall hangs down in qianchuan.Fl
Block elements:Address-AddressesBLOCKQUOTE-Block ReferenceCenter-lifting Alignment blockDIR-List of directoriesDiv-Common block-level easy, is also the main tag of CSS layoutDL-Definition ListFieldset-form control GroupForm-Interactive FormH1-Big titleH2-SubtitleH3-3 level headingsH4-4 level headingsH5-5 level headingsH6-6 level headingsHR-Horizontal Divider LineIsindex-input promptmenu-List of menusNoframe
1. What is the difference between block-level elements and inline elements?Block-level element exclusive rowInline elements can be displayed on a single line, but cannot set the upper and lower padding and margin values.2, block-level elements and inline elements of the conv
Summary of line elements and block-level elements in html, and summary of html elements
I. First, let's summarize the following elements and block-level elements:
Line element:
embed an image into the webpage
Block-level elements
Summary of line elements and block-level elements in html, and summary of html elements
I. First, let's summarize the following elements and block-level elements:
Line element:
embed an image into the webpage
Block-level elements
1. Some special font styles:Indent 2 characters in first line: {text-indent:2em;}Center horizontally: {text-align:center;}Justify: {text-align:justify;}Center vertically: {vertical-align:middle;}Word spacing 2 characters: {letter-spacing:2em;}Line spacing twice times: {line-height:2;}2. The navigation bar is fixed somewhere on the page (relative to {position:fixed;left:px;top:px;}3. Block-level elements and inline
First, select elements through HTMLSelecting Elements by ID-document.getElementById (' id ') can be used to select a child element based on the ID in the current DOM tree650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7E/5C/wKiom1b8_g_wmda3AAF6fOGaY80526.png "title=" Web.png "alt=" Wkiom1b8_g_wmda3aaf6fogay80526.png "/>Select elements by Tag name-Node.
It's not easy to use CSS to center an element in a display. The same CSS centering settings in different browsers also have their own performance. This article introduces several common methods for displaying elements horizontally in CSS. 1. Centering with automatic marginThe preferred way to center elements horizontally in CSS is to use the margin property-set the Margin-left and Margin-right properties o
example, the code running effect 2.1.6.3 is shown. to better illustrate the problem, a black solid-line border with 1 pixel width is added to both block elements and embedded elements. You can see that DIV is a block element by default, when the value of the display attribute is defined as inline, embedded elements are displayed, while SPAN
Blocks (block) elementDisplayed as a piece, with a newline before and after. Block elements are commonly used in the main building blocks of Web pages. such as:inline (inline) element (inline Element)Displays the contents of the parent element in a row within the row. Inline elements are often used to mark small pieces of content. such as:Empty (void) elementNo content, with a start tag. such as:Entity char
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.