Caching jquery and common styles to localstorage can reduce HTTP requests and optimize page load times, which can be implemented by the following code:
To view write records:
Packaged into JS Plug-ins:
/** * Plug-in function: Use
[Question and Answer question] Topic description Please use CSS to achieve the following figure style, related dimensions such as illustration, where the DOM structure is:
realize the idea
1, first think about a problem: When the border-width is
1. Background analysis:
Previously in the development of a page loading plug-in, wrote two parameters, one is Loadinto, one is delete, the first loadinto is to add the relevant page elements to the page, the second delete is to remove the added
Word wrapping in long words
1. Word-wrap:normal | Break-word;
The Word-wrap property allows a long word or URL address to wrap to the next line.
Normal: The browser keeps the default processing only when the allowed hyphenation points are wrapped.
Written in front of the words:
As a result of more CSS content, small series has no energy to speak from beginning to end, can only be targeted to explain.
If the reader understands the CSS box model, but does not understand the float, then this
CSS Line-height Properties
CSS Reference Manual example
To set the row height as a percentage:
P.small {line-height:90%}
p.big {line-height:200%}
Give it a shot yourself.
(You can see more instances at the bottom of the page) browser support
1. First Web-inf documents can not be outside access, so css,js and other documents can not be placed here, just at the beginning I made the front end of all the things put in the web-inf under so certainly wrong.
2. By asking seniors learned that
Some CSS properties for wrapping and cropping
Word-wrap:normal | Break-word
Normal line wrap, content can break container, such as long word or long number of cases
Break-word Word as the basis for the line, if necessary, the word inside allowed
Install Css-loader
$ NPM Install Css-loader Style-loader
The former (Css-loader) is to traverse your CSS, the latter (Style-loader) is for the style tag generationIt can be used to package the CSS, we add the configuration file
{
test:/\.css$/,
Prerequisite Summary:
A Web site or channel page, the content of more pictures, and changes are not too frequent, how to optimize to become a difficult problem, the use of CSS Sprite function can be implemented to merge multiple pictures together
JS blocking features: All browsers in the download JS, will prevent all other activities, such as other resources download, content rendering and so on. It is not until JS downloads, parses, and executes that it continues to download other resources
I. Definition of BFC
BFC (blocks formatting context) Literal translation is "block-level formatting contexts." It is an independent rendering area, with only block-level box involved, which prescribes how the inner block-level box is laid out and
1 Block-level elements and inline elements
1 Block-level elements
Occupy a row and cannot be tied to any other elements
Can accept wide, high
If you do not set the width, the width defaults to 100% of the father.
2 in-line elements
Alongside other
1 Tag Selector
is to use the tag name as the selector.
1 All tags can be used as a selector, such as body, H1, DL, UL, span, etc.
2 No matter how deep the label is, it can be chosen.
3 The choice is all, not one. So it's a commonality, not a
Scene: The parent element is highly fixed and how the text in it is centered vertically.
Method One:
Code:
Test text Test text
Test Text Test text Test text Test text Test text Test text
Result
Originally thought that the text overflow processing is more complex, did not expect such a simple sentence to take care of, CSS is really magical:
. li {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
Now learn to want to understand
Preface
In the previous period, we made the self-adapting webpage of the maker Technology website, and gained a lot in the process of writing. After the development of the company's PC checkout, the CSS changes in the pain. Learn from the
The general use of CSS to set font properties is to do this:
Example Source Code [www.52css.com] font-weight:bold;
Font-style:italic;
Font-varient:small-caps;
Font-size:1em;
Line-height:1.5em;
Font-family:verdana,sans-serif;
But you can also write
This article introduces you to the article about how to use pure CSS to achieve a Saturn effect, there is a good reference value, hoping to help the needy friends.
Effect Preview
Code interpretation
Defining the DOM, the container itself
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