If floating elements are different in height, they may be "stuck" by other floating elements when they move down.
Cases:
HTML file:
"Http://www.w3.org/TR/html4/loose.dtd" >
css left-floating example
div1
div2
div3
Place three div on the page, the background is pink, width 150px, height 100px, blue, solid line. Three Div are left floating, to achieve horizontal arrangement.
HTML file:
"Http://www.w3.org/TR/html4/loose.dtd" >
css left-floating example
Example requirements: A box has more than one picture, the picture's margin consistent, and can automatically wrap, to achieve the picture window effect. The final effect figure is shown at the end of the article.
Realize the idea:
Basic structure:
CSS Box Model diagram:
We have some common property names in Web design: content, padding (padding), Borders (border), boundaries (margin), and CSS box models have these properties.
Example:
HTML file Contents:
An element can have both an ID selector and a class selector, but only one ID selector, and the ID selector has a precedence greater than the class selector.
Cases:
HTML file Contents:
an element can have both an ID selector and a class
Basic syntax:
#id选择器 {
Property Name: property value;
......
}
Example:
HTML file:
css ID selector
very very important news
Content of Selector.css:
The use of/*id selector * *
#id1 {
background-color:silver;
font-size:20px;
}
The implementation is as follows:
The instance code is as follows:
paper aircraft &L T;style>. Wrap {position:relative; Display:inline-block; width:300px; height:120px; -webkit-animation:
This article mainly introduces the left fixed, the right self-adaptive two methods of implementation, I believe that everyone learning the layout of the web will be very good help, the following with the small series to see it
The first
This article to share a piece of CSS3 code to achieve the mouse hover border rotation effect, the code is easy to understand, very good, with reference value, need to refer to the friend
The following is an example of the 2017 New Year greeting to
Today Xiao Ying to everyone to share a love with CSS painting, the bottom of the code and production process, I hope to help you.
The first step:
Draw a square first.
css Painting Hearts
Step Two:
will take
1, multi-element horizontal center
To achieve the effect:
Ordinary people see the topic, the initial feeling to realize the effect of the picture is not difficult, set the small black box width and height margin, font horizontal vertical center.
Instance
Align the elements of the elastic box in the center:
p
{
display : Flex Span class= "pun" style= "Color: #93a1a1" ";
align - Span class= "PLN" style= "color: #48484c" >items : center ;
}
Three basic positioning mechanisms in CSS
A. Normal document flow
B. Positioning: Relative positioning
Absolute positioning
Fixed positioning
C. Floating
1. In the normal stream, the element position is determined by the document order and
Previous words
Justification is very common in the production of navigation Nav. This article will detail 3 ways to implement CSS Justification
Flex
Flexible box model Flex, as a powerful, resilient layout, can hold most of the layout effects,
CSS pseudo-Class (pseudo-classes)
Anchor pseudo-class: In a browser that supports CSS, the different states of a link can be displayed in different ways, including: active, accessed, not accessed, and mouseover.
a:link {color: #FF0000}/* not
Some of the classic CSS techniques, we still need to remember, this can save us a lot of time, below the zero for everyone to recommend a few better CSS skills:
1. Use the same navigation code on different pages
Many pages have navigation menus,
Today, a problem is that the contents of the title are displayed in the body
324234
Search on the Internet is that there is a problem with the encoding method of this situation, so look at my coding situation, found that there are no
hurry up to the example
/*normalize this CSS framework, you can go to search, very useful *//* This, is the small icon CSS framework, usage and bootstrap almost */nomalsepalse matescriptcss3
More CSS3 small icon tip effects related articles
Previous words
When we use certain behavior (click, move or scroll) to trigger the page to draw large area, the browser is often unprepared, only passively using the CPU to calculate and redraw, because there is no prior preparation, to cope with
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.