The display: inline-block attribute is often exposed when CSS is used for performance. Whether it's a friend who has been familiar with Web standards or standards for a long time, metropolis is confused and vague about this attribute.Display: inline-blockThe object is presented as an inline object, but the content
An inline-level element attempts to insert a block-level element. This is not allowed. The only exception to inserting block-level elements in an element is the object tag. So what are inline-level elements and block-level elements ?.
Block ElementA block element is generally a container element of other elements. Block elements generally start from a new line and can accommodate
css| Design | detailed
Chunk elements (block Element)Typically a container element of another element, the block element typically starts with a new row, it can hold inline elements and other block elements, and the common block element is the paragraph label ' P. "Form" is a special block element that can only be used to accommodate other block elements.
If there is no
+padding. The block element has a separate row. Inline elements are not exclusive to a single line, and it is useless to set a wide height for him.In HTML, it is a block-level element. display:blockthe setting is to display the element as a block-level element. The code below is to convert the inline element A into a block element, using the a element from the page with a block element feature.a{display:b
the block elements presented as inline objects (two display to be placed in two CSS declarations to have effect, this is a classic IE bug, If Display:inline-block is defined first, then the display is set back to inline or block,layout does not disappear). The code is as follows (...). Other attribute content omitted):
p {display:inline-block; ...} p {display:in
contain property value pairs id="myStyle" ).
CSS rules can be located in the following locations:
An external CSS style sheet is a series of CSS rules stored in a separate external CSS (. css) file (not an HTML file). The link in the header section of the document file
Css uses display: inline-block for layout,
Display of css: inline-block Layout
1. Several commonly used display attribute values, inline, block, and inline-block
Inline:
Block:
css|dreamweaver| Tutorial
Site original content, reproduced please indicate the source Web page teaching network .
Five. Define CSS Style Box Properties
Use the box (also called box) category of the CSS Style Definition dialog box to define settings for labels and properties that control how elements are placed
css|dreamweaver| Tutorial
Site original content, reproduced please indicate the source Web page teaching network .
Nine. Define CSS style extension Properties
The extended style properties include filters, pagination, and cursor options, most of which are supported only by Internet Explorer 4.0 and later.
Specify extended properties: In the
CSS display: inline and float: left the difference between CSS display refers to the display status, inline indicates inline, characteristic is closely related to the previous inline element, usually the default
(line boxes). Anonymous Block Box (Anonymous block boxes): DIV > Some Text P > More text DIV >As above, the div appears to contain inline (in-line) content and block boxes, in fact, according to CSS rules, in the some text around is an anonymous block box, so that the div block box contains only the Block box.In other words: if a block box (like the box generated for Div in the previous example) contain
not produce a margin effect.Display:inline-block1. Simply, the object is rendered as an inline object, but the object's contents are rendered as a block object. Subsequent inline objects are arranged in the same row. For example, we can give a link (a element) Inline-block attribute value, so that it has both block width height and
These two days in preparation for an internship interview and written test, ready to review these basic concepts, to avoid oneself in a brain only understand the mouth can not be expressed in a state. The concept of block elements and inline elements appears in the place of CSS page layouts. The main feature is to divide the HTML tags into 2 categories according to certain attributes: block elements and
Elements such as p, H1, or div are often referred to as block-level elements, which appear as a piece of content; strong. Elements such as span are called inline elements, and their contents are displayed in rows, or inline boxes. ( You can use display=block to convert inline elements into block elements,display=none means that the generated element doesn't have
layout, and it is the row layouts, so after the trigger, the block element is still the row layout, but not as the block elements in opera as an inline object. How does the IE block element realize the Display:inline-block effect?There are two ways of doing this:1, first use the Display:inline-block property to trigger the block element, and then define the Display:inline, so that the block elements presented as
(for self-backup only) original address: http://blog.csdn.net/chq11106004389/article/details/50515717CSS composition Selector/selector + declaration (attribute + value)Selector/selector , which indicates the element in the Web page to which the style rule applies, as in this case p is the selector , its text will turn blue, and the other elements (such as OL) will not be affectedstatement: When there are multiple declarations, the middle can be a semicolon ";" Separated--------------------------
are parsed to true or false. It contains not only min-width,device-height,orientation these commonly used media functions, but also supports and,not,only logical operators and the use of commas to separate lists. This makes it possible to make a variety of complex query conditions.Four: Display:inline-box there are extra gapsThe problem that came up a few days ago, like the following,HTML code:1 DivID= "wrapper">2 Divclass= "box">1Div>3 Divclass= "box">2Div>4 Divclass= "box">3Div>5 Divclass= "b
css|dreamweaver| Tutorial
Site original content, reproduced please indicate the source Web page teaching network .
Three. Define CSS style Background properties
Use the background category of the CSS Style Definition dialog box to define the background settings for a CSS
1. Inline CSSInline CSS can also be called inline CSS or row-level CSS, which is introduced directly inside the tag, the obvious advantage is very convenient and efficient; but it also creates the disadvantage of not being able to reuse styles, if the number of lines of code
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.