---Restore content starts---
Box-sizing
Properties allow you to define specific elements that match a region in a specific way.
For example, if you need to place two boxes with borders side-by, you can set box-sizing to "Border-box". This allows
Recently, to imitate a page, one effect is that the three menu bar is deformed to X effect,
The effect is as follows:
Figure (1) Initial effect
Figure (2) mouse hover effect
Ideas:
three-Horizontal implementation: The traditional can be
There are three types of CSS written in the format
Inline style: meaning to write styles within a row
For example, say Write my colors in inline styles
Applies only to (font color and background color) and labels, but not to for example: Head,
We all know that the full name of CSS is called "Cascading style sheets", but it is estimated that many people do not know the meaning of the word "cascade". In fact, "cascade" refers to the overlay of the style, when an element is applied to a
font-family Setting the font name
Multiple names can be used, separated by commas, and browsers use the available fonts in sequence
P {font-family: ' song Body ', ' blackbody ', ' Arial ';}
Font-size Setting the font size
length specifies the
We all know that link and @import can introduce CSS style sheets, so what's the difference between the two? Let's talk about their respective links, then tell them the difference.
Link link in the way:
How to @import import:
Priority:
Display is used to set how elements are displayed
Display:block | none | inline | Inline-block
Inline: Specifies that the object is an inline element
Block: Specifies that the object is a block element
Inline-block: Specifies that the object is an
We can animate through CSS, and here's what I'm going to show you are the rotation of P, the animation of color transitions
move the mouse over the rectangle below: two seconds to rotate the
The effect of their own test, very gorgeous
The following small series for everyone to bring a brief talk about CSS and @import differences and usage. Small series feel very good, now share to everyone, also for everyone to make a reference. Let's take a look at it with a little knitting.
percent Value of 1.margin the percentage of ordinary elements Maigin is calculated relative to the width of the container element (width).
Here we set a container with a width height of 800 * 600, respectively, outside the picture. Set img{margin:
The underlying child element selector can only be looked down at the first level, not across
HTML code:
This is my web page.
CSS code:
P>strong {color:purple;} p>strong>i {font-size:50px;}
1. The child element selector can only select
Parent-child element margin overlap
Workaround:
Add a floating property to the child element, and the corresponding parent element adds the necessary clear float property;
Adds edge attributes to the parent element, such as padding, border;
CSS is a Web page of the coat, not good-looking all by CSS style, and layout is the most important part of CSS, below to analyze a few common layout.
Flow model
The flow model is the default mode of page layout and the most common layout mode, he
The horizontal direction of the element floats, meaning that the element can only move left and right without moving up or down.
A floating element moves as far as possible to the left or right until its outer edge touches the bounding rectangle
I. Characteristics of absolute positioning
Absolute positioning has the same characteristics as floating, that is, enveloping and destructive.
In terms of destruction, floating only destroys the height of the element, retains the width of the
The box is the basic concept in CSS, and we need to use it to configure the appearance of the elements and the overall layout of the document.
1. Apply padding to elements
The app padding adds white space between the element content and the
1.[class~= "Flower"]: Select the class with Flower
class= "Flower SS"
class= "SS Flower"
2.[class|= ' top ': Select the class that starts with top to have '-' connected or separate top
Class= "Top-ss"
class= "Top"
class= "TOP-SS"//Not
When we do JS animation, often need to do callback processing, such as an animation after the completion of an event, an animation after the completion of another animation and so on, but in the use of CSS3 animation can not capture the state of
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