[Convert] N methods for removing the spacing between inline-block elements, inline-block spacing
From Zhang xinxu-xin space-xin Sheng lives [http://www.zhangxinxu.com]1. symptom description
In the true sense, the horizontal inline-block elements are separated by line breaks or spaces. A very simple example is as follows:
The spacing is coming ~~
This problem als
IE6 is compatible with the inline-block method, and ie6 is compatible with the inline-block method.
Some may say that IE does not support the display: inline-block attribute, indicating that it has doubts or objections. "I always use display: inline-block for inline elements
The two concepts of 1.block and inline are abbreviated, complete and exact, block-level elements (block-level elements) and inline elements (inline elements).Block elements are usually separated by a separate line, and the inline element does not produce a newline, and a series of
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
Inline-block:can add height, width, margin and padding. Not take the whole row.
Bl
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
When talking about label classification, we as beginners in the first use of the label will
ConceptBlock-level: blockInline: InlineInline block level: Inline-blockIn an HTML element, the element will have the display propertyThe default value of the Display property is block, then the element is a blocks-level element.The default value of the Display property is inline, and the element is an inline element.The display default value without elements is
block: English translation is a " block " meaning, as a child played the same block blocks, a piece to the top.inline: English translation comes to the meaning of "inline", the inline is not good understanding, my understanding is the element within the line; block and inline are relatively popular, block should be "block-level elments" (Block-level elements),
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 conversion of each other?Block-level elements in the change-in element: Display:inline;Inline
Advantages of inline functions:One: the inline function of the class defined by inline, the code of the function is put into the symbol table and replaced directly (as the macro definition expands), without the overhead of the call, the efficiency is high.Second: The introverted function of a class is a real function.Three: Use
1. Get in-line (inline) style:obj.style.attr; Gets a non-inline style.2. Set the inline style:Obj.style.attr = value;3. Get non-inline styles:function GetStyle (obj,attr) { //get non-inline style, obj is an object, attr is the value if (obj.currentstyle) {/ /get non-
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 can set the margin and padding properties.
Display:inline
The Inline keyword is used to define an inline function of a class. The main reason for introducing it is to use it to replace the macro definition in expression form in C.
An example of macro definition in expression form:
# Define expressionname (var1, var2) (var1) + (var2) * (var1)-(var2 ))
1. Why macro in expression format?
1). High macro execution efficiency. Because it is directly replaced by text at
C ++ inline functions and inline functions
1. Inline Function Definition
Inline functions are basically the same as normal functions when being defined. They just add the "inline" keyword before the function value type. The definition method is as follows:
Name of the ty
When reading the Linux kernel source code or performing performance optimizations on the codes, there is often a need to embed a piece of assembler code in the C language, which is called inline assembly in CS terminology. The notes in this article attempt to illustrate the basic grammatical rules and usages of inline assembly (students with strong English reading skills are advised to read the technical ar
Inline can be placed in. cpp, but only this CPP file can use it at this time.To make a public object, you must put it in. H. If you do not want to put it in. H, you must copy one copy of each CPP file.In fact, even if it is put in. H, it is also a copy of each CPP file, but the compiler completes this copy for you.If the inline function is repeated, it will not cause a connection error. That is, it can be d
How to solve the blank spacing and inline-block spacing of inline-block elements
In the morning, someone raised the following question in his blog: "The li element inline-block is horizontally arranged and there is an unknown gap ", I believe you have encountered this situation when writing pages.
I usually float li in this case, so there is no gap. However, ther
Element Classification and characteristics: 1. Block-level elements: In HTML (1), each block-level element starts from the new row, and the subsequent element is also a row; ( a block-level element that has a single row )(2), the height of the element, width, row height, and the top and bottom margin can be set ;(3), the element width is not set, is its own parent container of 100% (and the width of the parent element consistent), unless a width is set. 2.
NoneThis element is not displayed.
Block: This element is displayed as a block-level element.Line Break.
Inline default. This element is displayed as an inline element, before and after the elementNo line break.
Inline-blockIntra-row block elements. (Newly added value of css2.1)
In CSS, inline-block: submits an o
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 elementsWhat is a block-level element. In HTML a{
Display:block;
}
Block-level element features:1, ea
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.