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 removes the inline-block gap. CSS inline-block
Recently, the inline-block element is often used for the layout of mobile pages, but there is inevitably a problem, that is, the gap between inline-block elements. These gaps may
Differences between inline, block, and inline-block in css, inlineinline-block
Http://www.cnblogs.com/fxair/archive/2012/07/05/2577280.html
Display: inline displays the element as a block-level element.
The block element has the following features:Always starts on a new line;Height, row height, and top and bottom margi
Proper use of embedded frames can bring a lot of convenience to the creation of Web sites, such as when you click an online playback MP3 file, you can use the inline frame for local refresh.
Effect description
Create a file with a link to a large web site as an example, and when you click the link, the content of the site appears in the table for users to browse.
Creative Thinking
Open Dreamweaver MX 20
, and it is the row layout, so after the triggering, the block element is still the row layout, instead of submitting an inline object as a block element in opera.
How can I implement the display: inline-block effect for block elements in IE?
There are two methods:1. Use the display: inline-block attribute to trigger the block element first, and then define the
There are 3 basic positioning mechanisms in CSS:Normal flow (relative positioning is actually considered as part of the normal flow positioning model)Float (float)Absolute positioning (fixed positioning is a kind of absolute positioning)So before learning to float, we need to understand block-level elements and inline elements (inline elements).block-level elements: block-level elements are generally used a
;} Div {display:inline;} 2, set the block element directly to an inline object (display:inline), and then trigger the layout of the block element through Zoom:1, with the following code: Div {display:inline; zoom:1;} So in order for all browsers to support Display:inline-block, combine the final implementation code as follows (refer to Yiwen: Impersonation Compatibility Inline-block property): Disp
again: block-level labels and inline block-level labels are both long and wide, but block-level tags are set when you're ready to
It is automatically wrapped, you can not put other things in this line, and inline block-level labels in the same row can be placed in multiple inline labels, I have a case to explain.
Operation Result:
3. Converting block-level la
,inline and inlinke-block details comparison
Display:block
The block element will have a single row, and multiple block elements will have their own new row. By default, the block element width automatically fills the width of its parent element.
the
block element can set the Width,height property. Block-level elements, even if they are set to a width, are still exclusive rows.
The block element ca
CSS block-level tags, inline tags, inline block label conversions
In basic 1, I have detailed the common properties of CSS, several different selectors, on the basis of which we can further understand their characteristics so as to better learn and master the relevant development skills.
Classification of HTML tags
Wh
Understanding the most common CSS display types of block, Inline-block, and inline would allow you to get the most out of Y Our HTML and use CSS frameworks like Bootstrap to their fullest.Takeway:
Inline:can not add height and width. But can add margin and padding
Inl
In the form of CSS-style code insertion, the basic can be divided into the following 3 kinds: inline, embedded and external three kinds.1:内联式CSS style sheet is to write CSS code directly in the existing HTML tags, such as the following code:2: Embedded, embedded CSS style. i
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 eleme
Issue backgroundWhen some HTML tags use box model properties, some properties fail?Block element exclusive row (whether to add width), the element before and after the other content to wrap directly applicable box model of all CSS properties of the row element is not exclusive row, multiple rows of elements can be rendered in a row part of the applicable CSS box model properties: • Width, height settings ar
Now is an era that advocates structure, performance, and behavior separation. The biggest benefit is that it is easy to maintain and convenient,CodeReuse. Writing CSS and Js in HTML is like a hodgedge, which is hard to understand, has poor readability, large files, and is very difficult to maintain.
But is CSS inline or external? As long as we analyze its char
, can not directly define the width of the high, even if the outer layer is a block element containing inline elements, also cannot directly define the width of the height./* The following statement directly defines the center of the wide height is invalid */(3) inline block elements are also called inline elementsTypical representative: Input, imgCharacteristics
First, CSS box model
The following two images can illustrate the CSS box model, the difference between padding and margin, padding in the border, margin outside the border. Personal understanding is around the label node to design the style, it must remember the definition of the style of what it is to be effective, useful ...
ii. Classification of elements
Element Classification--block-level elementsWha
Block elements:It is generally the container element of other elements, can accommodate block elements and inline elements, which by default will not be the same line with other elements, that is, the equivalent of two blocks are written together vertically layout. The most common is div and PInline elements:Inline element is also called inline element, it can only accommodate text and other
Today, the jquery blog encounters the relationship between the CSS document stream and the block-level inline element (Inline). Recently, I have been working overtime, having poor sleep and getting confused. The simple problem is complicated.There are too many projects, and some need to work together with colleagues. Some need to be put into error, big head.Docum
. For example, the font size is defined only for paragraphs formatted with labels that contain inline styles.
Dreamweaver renders most of the style properties that you apply and displays them in the document window. You can also preview the document in a browser window to see how the style is applied. Some CSS style attributes do not look the same in Microsoft I
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.