Leave the second div out of the document stream and move to the right and the original space will not be preserved.
HTML file:
"Http://www.w3.org/TR/html4/loose.dtd" >
Examples of css absolute positioning
Content 1
Content 2
Requirements:
(1) The default style is black, 24px, no underline;
(2) When the mouse moved to the hyperlink, automatically underlined, the font size into 40px, color into green;
(3) After clicking, the hyperlink turns red
HTML page content:
A recently completed project needs to be supported by Chrome, and in the process, I've found a chrome that distinguishes between CSS parsing and FF, ie, and so on.
The requirement of the project is to display a prompt box in the center of the
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
The company's project needs to display a picture of the user-supplied URI link, but it is not possible to know the size of the picture beforehand, and if the picture size is too large, it will affect the layout of the page. The ideal solution is
Recently in the study of CSS, just combined with the project made a flexible tab, using pure HTML+CSS implementation, just summed up.
First look at the preview interface:
Sample HTML can be accessed:
Note: √ attribute inheritance x does not inherit
[] to accommodate element types none [] marked as all elements
Font
√font-family
√font-size 9 Xx-small X-small Small Medium large x-large xx-large smaller larger
√color
√font-style Normal Italic
Participated in the project has been for some time, the author of the Web Standard design learning has made a lot of progress. Before learning and practice are Google side reading, only input not output, also rarely communicate with everyone. The
Go directly to the theme!
First, from the center of the document flow element
Method One: Margin:auto method
CSS code:
p{ width:400px; height:400px; position:relative; border:1px solid #465468; } img{ Position:absolute;
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
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
First, pre-theoretical preparation
1) Purpose:Dynamically generate CSS statements in the JSP and output them to the browser for parsing and rendering.2) The browser parses the file according to:After the page loads, the browser initiates individual
Flex is a resilient layout.
Any container can be specified as a flex layout.
. Box{display:flex}
Inline elements can use the Flex layout
. Box{display:inline-flex}
The browser of the WebKit kernel must be prefixed with the-webkit.
.
From Sass to Postcss
I've been using sass for years. But recently I wanted to use POSTCSS and its Cssnext plugin to try to work with styles. I love it. You can now use future CSS features, which are more handy than the tools I used earlier. My
As we all know, the form of a write element native style is not very good-looking, the project needs to be optimized, the following article mainly describes how to use CSS3 beautify the radio, check the display style of the button, the need for
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
JS implementation
Recent projects need to implement a character-by-word typing effect, on-line search has a good jquery plugin typed.js, the effect is great
Specific usage can look at the project address, annotated source code more than 200 lines,
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
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.