First, CSS Box model overview
Essentially, each element in the CSS is surrounded by a box. This box specifies the processing of the element box, in which the center extends outward including the box's dimensions (Width and Height: width and height),
Common property and attribute values for box models
/* Basic Properties */padding:padding-left/right/top/bottomborder:border-left/right/top/bottom Border-radiusmargin: margin-left/right/top/bottom/* positioning */position //Put an
1.
On the wording of background
div.comment
{background:#f0f0f0 url (
URL address)
repeat-x left top}1) You can see that the first definition of background is a color value which means that the color will work when the background image fails.
2)
Common wording:
The following summarizes the classification of common responsive layouts:
@media screen and (max-width:320px) { #talkFooter. editarea{...}} @media screen and (min-width:321px) and (max-width:375px) { #talkFooter.
1. Read through the following
W3cschoolOn the introduction: CSS3 box-sizing Property _w3cschool.
2. Look at the introduction of understanding is not deep enough, I belong to just read the blink of an eye can forget people. For your own worry, or
First Note: The use of selectors (tag, class, id)
The ID (#) in three selectors has the highest priority, and the unique element is filtered according to the ID name;
Enter as follows:
#menu {width:1200px; height:45px; background: #90F}
Second,
Here is a brief introduction to the CSS in a more important!important attribute, from the author's practice summed up the following two points:
1. It is used to solve the situation that IE has deviation from some CSS specifications.
For example, in
Avoid using @import
Using @import in an external CSS file causes the page to add additional latency when loading.
A CSS file First.css contains the following content: @import URL ("Second.css"). The browser first downloads, parses and executes FIRST.
Do you know that CSS is commonly used for optimization? Below we will give you a detailed introduction of it! We have accumulated some experience, here to share with you, please correct each other.
I. Using CSS Abbreviations
Using abbreviations can
Your CSS in the Behavior property of the syntax is familiar, here to you briefly describe, in the CSS page layout, when we encounter the refresh to keep the contents of the form, CSS in the behavior for us to solve the problem well.
This article
The first thing to know is that P is a block-level element that has a single line in the page, arranged from top to bottom, which is the legendary stream.
As can be seen, even if the width of the P1 is very small, the page can tolerate P1 and p2,p2
Only-child Selector
The selector :only-child selects only one child element in the parent element, and only one child element. That is, there is only one child element in the parent element of the matching element, and it is a unique child element .
In general, we can set a CSS property for picture to define its height and width. But sometimes we just want to control the maximum visible size of the picture. There are generally two ways to do this: 1. Use CSS property values directly, 2.
One, the Web page production Technique example solves: uses the CSS to control the picture adaptive size
Picture Auto-fit size is a very common function, in the production time in order to prevent the picture to open the container and the size of
Default style for drop-down list:
Here are two ways to customize a drop-down list:
Method One:
Customize the style of the drop-down list with a pure CSS.
Principle: Clears the Default drop-down list style, customizes the style, and attaches a
In the web design, the horizontal navigation menu is very extensive, in CSS style, we usually use the float element or "display:inline-block" to solve. And today we're going to focus on how to center elements of unknown width, and here are a few
Small CSS record and CSS record
1. Make the image and text unreproducible
-webkit-user-select: none; -ms-user-select: none;-moz-user-select: none;-khtml-user-select: none;user-select: none;
2. Align the image vertically
.Logo{height:
Basic HTML knowledge (to be continued), basic knowledge to be continued
I. HTML editing tool: Sublime Text
2. HTML Entity characters: 1. (Space): & nbsp; 2. () & gt; 4. (&) & amp; 5. (") & quot; and so on
3. Basic HTML Tag:
Annotation MARK:
Line
Several common methods for clearing floating, and several methods for clearing floating1. Parent div defines pseudo classes: after and zoom
Left Right div2
Principle: IE8 or above is supported by non-IE browsers: after. The principle is
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