Place three div on the page, the background is pink, width 150px, height 100px, blue, solid line. Let Div1 right float
HTML file:
"Http://www.w3.org/TR/html4/loose.dtd" >
Example of css right float
div1
div2
div3
TEST1.CSS file:
. box{
CSS settings background picture needs to use the Background property, where the background-repeat set the way the picture tiles, no-repeat for the picture does not repeat tiles. A description of the background-repeat in the CSS manual is as follows:
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:
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;
}
I always feel that the CSS background image positioning Some specious, this problem has plagued me for a long time, today finally understand, must be written down to prevent forgetting.
In CSS, the background image is positioned in 3 different
Use
hoverMovement change
pOf
margin-topCan make the small module up, while in the bottom of the small module two diagonally divided into two colors of the square, relative to the small module absolute positioning, you can create a simple
Usually need to pay more attention, touch not compatible how to see more can I use, the amount, there is to understand how the page is compatible to what extent
1 whether compatibility is required
A come up to think of this problem, some effect
Oocss and BEM
We encourage the use of some combination of oocss and BEM for the following reasons:
Can help us clarify the clear and rigorous relationship between CSS and HTML.
can help us create reusable, easy-to-assemble components.
Selector:first-child This is the descendant selector. Weird, be careful to avoid rather than understand.
Selector:first-child
The first element in the current selector selected element collection
Selector:last-child
The last element in the
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 ;
}
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
I. The restrictive effect of relative on absolute
1, limit left/top/right/bottom positioning. Absolute default is in the upper left corner, when the parent class is set to Relative,absolute is limited to the parent class's area, when setting
lite list -+class.1 (1.0.1-1.0.6) text 1 "1". Text 1 "2". Text 1 "3". end. -+ NBSP;class.2 (2.0.1-2.0.5) text 2 "1". Text 2 "2". Text 2 "3". END.-+class.3 ( 3.0.1-3.0.5) text 3
Ashes level clear float
. clearfix:after { content: "."; Display:block; height:0; Clear:both; Visibility:hidden; Overflow:hidden; *zoom:1; Compatible with IE}
There is a gap problem between inline element connections
Cause:
In the front page of the website, sometimes some triangles are used, in addition to the way the image is used, the border property of the CSS can also make the corresponding triangles. So, how to make use of border to achieve the production of
attr () Exactly, should not be a property, but a function of CSS, let us first look at the introduction of the MDN:
Summary
The attr () CSS function is used to retrieve the value of a attribute of the selected element and use it in the style Shee T.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service