Cascading Style Sheets (CSS) are a series of formatting rules that control the appearance of Web page content. When you use CSS to format page formats, content and presentation are separated from each other. The page content (HTML code) is in its
In this case, the is left floating, to achieve the text surrounding the effect of the picture.
HTML file:
"Http://www.w3.org/TR/html4/loose.dtd" >css to achieve the effect of text surrounded by pictures DCSs Learning
A previous article describes the implementation of this effect, but the implementation of the code is too cumbersome, so here to share the following simplified version of the implementation method, there is a need to refer to learning.
Please
This paper mainly introduces the method of horizontal vertical centering of the absolute positioning element, there are 3 methods to be used for reference, friends need to see it together
1.CSS Implementation Center
Disadvantage: You need to know
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
The contents of this chapter:
Knowledge Point One:
Box models: The box model consists of four components with content (element contents), padding (padding), Border (border), boundary (margin), and these four sections contain top/right/bottom/ Left
Previous words
Cascading context Z-index is just a matter of resolving two element overrides, who are closer to the user. The CSS blending mode is the problem of how the two-element overlay is mixed. If you know Photoshop, you should be familiar
Before because of the company project needs, found on the Internet:
directly on the code.
HTML code
This is content 111 Here is the content 222 Here is the content 333
CSS Code
. inner{width:265px; height:
Instance
Set the order of the Elastic box object elements:
P # MYREDP {order:2;}
P # Mybluep {order:4;}
P # MYGREENP {order:3;}
p # MYPINKP { order : 1 ;}
Handbook Network (www.shouce.ren) Note: Internet explorEr 10 and
when it comes to selectors everyone is not unfamiliar, the most estimated use is the ID selector and class selector, as for the other selectors, here today I avoided.
Class selector: The HTML element is given a loud name, tagged with class, you
1. Using margin
p { width:100px; height:100px; Background-color:skyblue; Position:absolute; top:50%; left:50%; Margin-top: -50px; Margin-left: -50px;}
Analysis :
top:50%; left:50% the top left of the element in the
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
In a project, you often encounter the need to set the element to be vertically centered horizontally. And the specific scene is different, so the personal summary of the method to do a summary, hoping to be useful to the visitors.
The examples given
This article on the CSS commonly used 6 properties to explore, we will certainly be satisfied with this article.
1.position:static
The static property is the default value of position, which means that when an element does not have a position
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
1.position:static
The static property is the default value of position, which means that when an element does not have a position property set for it, its default value is static.
2.position:absoluteThis is a position property value that will
First, Introduction
The Position property of CSS sets how elements are positioned, defining positioning rules for the element to be positioned. This property is useful for scripting animation effects.
1. Positioning elements (positioned element)
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
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