Introduction (Introduction)
Our current HTML tour is very smooth and has learned:
1. How to create the basic structure of HTML files
2. Title, paragraph, pictures and links
3. Font color, size and type
4. Background color, text alignment, bold
This article mainly introduces the use of CSS how to achieve the effect of relief, the text gives a detailed sample code and explanation, I believe that there is a certain reference value for everyone, interested in the following people to see
Triangle
When writing CSS, used the background map, ignoring the CSS itself can actually achieve a lot of simple basic graphics, such as triangles:
. triangle { border-style:solid; border-width:20px; Border-color: #000 transparent
Why do you want to initialize CSS?
Build station veteran all know, this is to consider the browser compatibility problem, in fact, different browsers on some of the default value of the tag is different, if not the CSS initialization will often
Use the time to pay attention to compatibility, modern browser chrome, FF, Edge and mobile side are all right, ie 9 or less.
The code is as follows:
CSS Styles
. spinner {margin:0 auto; width:82px; Text-align:center;} #fancybox-loading
Original CSS:
Border Property
Border-color: Border Color
Border-width: Border Width
Border-style: Border Style
None: No border. Regardless of any specified border-width valueHidden: Hides the border. IE does not supportDotted: ie4+ on Mac
Used to make Web animation generally use JavaScript, now there are more and more animation using pure CSS implementation, and animation control can also be implemented using CSS3, because the CSS is the same, CSS 3 animation function is really
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
CSS Precedence and inheritance issues
★css conflict, that is, the priority levelThe CSS itself can be set to apply multiple styles to the same element at the same time, and there may be conflicts between styles that do not reach the desired effect
Fan-making principle, the bottom of a solid color prototype, inside 2 of the same color of the semi-circle, can be white, the internal semicircle at a certain angle, you can produce a fan effect
sector drawing fan production principle, the
The question of how CSS vertically centers an element is already a cliché. Whether for a novice or a veteran, during the interview is often asked. Two days ago in a flex video tutorial, which mentions the question of the center of the element, so
1.transition
Syntax: transition:property duration timing-function delay;
Transition-property CSS property name to set the transition effect
Syntax: Transition-property:none | All | Property
None no attribute will get over effect
All properties will
P+css detailed
✪p+css "The term is actually an inaccurate term.
In the first note to make a mistake, it is called "p+css" is an inaccurate term, is the Chinese people to the layout of the standard page of the name of the method, is not enough to
Preface
Both EM and REM are flexible and extensible units, converted by the browser to pixel values, depending on the font size in the design, and if the value is 1em or 1rem, it can be converted from 16px to 160px or any other value by the
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
When people just touch the layout, they tend to use the positioning method more often. Because the concept of positioning seems to be relatively easy to grasp. On the surface, you specify exactly where a block element is located, and it will be
I. Float FLOAT
I. Definitions and Rules
float defaults to none, which corresponds to the condition of the standard stream. When Float:left, the element is tightened to the left of its parent element, out of the standard flow, and the width is no
Before I did not know BFC is what, today to see only know the original before often contact, just do not know the professional name. Like closures, inheritance, often used before, just do not know, today I would like to say, CSS positioning of the
This is perhaps the most commonly used centering method. If you know the size of each element, set a negative margin value equal to half the width of the height (if you do not use the Box-sizing:border-box style, you also need to add a padding value)
One, margin can be negative
In the box model, the Width/height, padding, and border of the content area cannot be negative, but the margin exception, which can be negative.
With regard to the use of negative margin, not much to understand, there
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