CSS's team work rules and how to write high-performance CSS code. One, use reset but not global reset Unlike the default properties of browser elements, reset resets some of the default properties of the browser element to achieve browser compatibility. It is important to note, however, that you do not use global reset:* { margin:0; padding:0; }This is not only because it is a slow and inefficient method, b
CSS Code refactoringhttp://www.cnblogs.com/aspnetjia/tag/The purpose of 125.CSS code refactoringWhen we write CSS code, not only do the page design effect, but also make the CSS
Dynamically Loading JAVASCRIPT/CSSS files
The traditional way to load external JavaScript (*.js) or Css (*.css) files is to add them directly to the
Copy Code code as follows:
These files are loaded synchronously into the current page in this way.
Now load the Javascript/
Image Adaptive screen code is as follows (via Background-image: () introduce the picture):
. Img{width:100%;height:100%;background-position:center;background-size:cover;background-repeat:no-repeat;} Background-image:url (picture path);
The above code can make the CSS image adaptive non-deformation, the principle here is to set the percentage.
Second, the
a CSS Text property:Color: #999999; /* Text color */Font-family: Song body, Sans-serif; /* Text font */font-size:9pt; /* Text Size */Font-style:itelic; /* Text Italic */Font-variant:small-caps; /* Small Font */letter-spacing:1pt; /* distance between characters */line-height:200%; /* Set Line Height */Font-weight:bold; /* Text Bold */Vertical-align:sub; /* Subscript word */ Vertical-align:super; /* Superscri
HTML code, CSS code, JSON string online formatting, beautification tool, cssjson
HTML code, CSS code, JSON string online formatting, beautification Tool
Http://www.phpthinking.com/format.htm
What is the working principle of the on
In the actual project, the recommendation is an HTML corresponding to a JS file and a CSS file. Doing so reduces the HTTP request, and it is well known that an HTTP request has a much longer delay than downloading a larger file.So from the programmer's point of view: I want to separate files, modules to write. Otherwise the code is too confusing. (Multiple files)Customers (users of the site) look: I want a
Today's resources are completely free of WebApp, and these WebApp can generate CSS3 code for the prefix of templates, gradients, and even browser properties. If you are a front-end developer, these resources can help you save a lot of time and can provide reusable source code for future projects.
1. CSS3 Generator
CSS3 Generator is one of the most popular Web applications for
Write CSS code to help improve the rendering speed of the page. In essence, the less CSS rules the engine needs to parse, the better the performance. MDN the CSS selectors into four main categories, as shown below, and the performance is lowered in descending order 1.ID rule 2.Class Rule 3. Label Rule 4. General rules
Code example to achieve page turning with pure CSS code
Code example-achieving page turning with pure CSS code-Experience Exchange
CSS alone achieves page turning. The principle is sim
In the Web page, usually the designers in order to highlight their product theme, will always let text or add special effects, such as to keep the text flashing, or regular discoloration. So as to achieve the purpose of attracting attention. So what are some of the other ways to achieve this feature, in addition to GIF animations made with PS? For those who understand the code, we all know that there are many kinds of
Modify CSS properties with JavaScript only native JavaScript is written.
1. Use JS to modify the label's Class attribute value:
The class attribute is one of the ways to refer to a style sheet on a label, its value is a stylesheet selector, and if the value of the class attribute is changed, the style sheet referenced by the label is replaced, so this is the first way to modify it.
The code to change t
It is a very important process to check and test your code to discover any potential errors so that you can eliminate them in a timely manner before putting them on the site. The process of code checking is also known as the linting between web designers and developers. As a designer, if you want to write highly optimized code, then you will need to linting tools
CSS implements code that is compatible with the code of div suspended on the webpage side of all browsers. cssdiv
The Code implemented by CSS is compatible with the code of div suspended on the webpage side of all browsers:CSS pro
first file is/upload/201109/20110926143903807.gif because its path uses a relative root path.
> and the second in/upload/201109/20110926143903169.gif, its path is just a normal relative path.
Copy Code code as follows:
$url = ' http://www.jb51.net/css/'; Preg_match ('/(. *\/\/.*?) \//', $url, $host);
Here use the regular formula to remove the h
code example of pure CSS code to achieve page-flipping effect _ experience Exchange
Pure CSS to achieve page-flipping effect, the principle is relatively simple, bookmarks with hidden.
Similarly, extrapolate can make other page-flipping effects.
The above is the code exa
How to compile CSSCodeIn order to be more efficient? This is a concern of many web page makers and developers. There is no magic. You can make sure that your style sheet is reduced to, but the CSS coding and organization skills are reasonable, it can indeed help you write clearer and more efficient code more efficiently. Naturally, you can reduce the size of the style sheet and reduce the download time.
I
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.