onfirのブログ -36ページ目

onfirのブログ

ブログの説明を入力します。

Now many people will use CSS framework for rapid establishment. So what is the CSS framework does, it is usually a collection of CSS files, these files include the basic layout, form patterns, grids, simple assembly, and styles Michael Kors Designer reset. Use CSS framework greatly reduce the operating costs for rapid establishment. Of course, for some large projects, it may be difficult to copy some frame directly, because the direct use will be some restrictions or redundancy issues. But in the CSS framework has matured today, we design projects in architecture, specifications, when available in the market at present some excellent framework also can give us a lot to learn from. This article focuses on several aspects of CSS frameworks can learn from the point of our project: 1. Directory Organization 2. CSS specification 3. Figure 4. Application of Information 5. Tips 1. Directory Organization on an analytical Michael Kors Christmas Cases directory organization we refer to the Bootstrap , organized Blueprint, Yui, Yaml four frame when using a framework, we generally put the desired style chain Michael Kors Satchels framework itself onto the page, and then make changes in its basis. Therefore, the framework itself brought the style can be understood as the basis of style. That is, we usually say global style + component style. You can see that in the directory schema 4 framework basically follows the conventional manner basic style + user-defined Extensible Stylesheet are organized. However, if you press Bootstrap practice, it may occur less frequently used components are also included together with the introduction of the style in the global style, if the components are also written in the global CSS, it is preferable to ensure that the higher frequency components was introduced, avoid the necessary bandwidth is wasted. About hack: For low version of the browser for written hack, it is handled, Blueprint and Yaml are introduced in the form of a separate file for processing hack, I also tried this approach. Personally I feel that the benefits of this approach is to avoid to bring advanced browser redundant code, and by introducing conditional CSS does Christmas Beauty iPhone 5 5S Cases not give advanced browser additional requests. It's more suitable for high and low grade browsers already deliberately designed under very different circumstances, namely hack more time before use. Or just to hack a dozen lines and more then introduced a document does not seem advisable. Michael Kors Bedford & Astor 2. CSS normative framework in a public module has the prefix prefix, respectively, the following three thought:. 1 Yaml, Yui:. Anyway at the beginning of a unified Christmas Angles iPhone 5 5S Cases identity, plus change the module names. 2. Bootstrap: Direct module name, this approach needs to be defined keywords. Public modules are button are in btn - beginning, image Cheap Michael Kors places img- beginning. 3. Nec: single letter at the beginning to identify the components. Apply a general framework, we first introduced the style framework, and then on top of covering their own style, so the frame can be seen as the basis of our CSS. We can learn a prefix regulatory framework to plan our basic CSS prefixes, take different approaches according to their actual project. . b way to draw classification of class division in the frame there are two kinds of standard, respectively, were as follows: [assembly granularity], and with [size] property. 1. component granularity: all style packaging component in a class name, call the class name to use this component. 2. The property is size: the time required property, call the corresponding class names assembled. In our daily projects, in order to divide the class name attribute is relatively rare, since they are isolated have been guided by the principle of 'structure, style, behavior', and strive to reduce the coupling of the three. However, in this way, divided in certain circumstances is not entirely desirable. For example, hide some of the elements, if not provide the name of the class, then, in the development phase of the development will be directly js inline style on the corresponding element (which will trigger the repaint / reflow), so the better way is and js trigger the development of a class name conventions show / hide the action, in this case, to display: none dividing a specific class name, supply development calls will seem very practical. So, more importantly, where we analyze the actual situation and give the best solution. c. style component class name combination components are basically the base class name + extension classes to change the name of the routine combination. But in terms of selectors can have three kinds of ways, most frameworks currently used are: multi-class choice, by modifying the html class name combination, to achieve the reduction. Button style to the realization of an example: here using conventional combinations, not repeat them. d. Advanced CSS selectors in the process of Bootstrap analysis found Bootstrap defines a series of icon, the icon of the class names are all prefixed with icon-. And in CSS, Bootstrap and uses a substring matching attribute selectors. [Class ^ = 'icon-'] The benefits of using this is that class for icon labels, we no longer need them to add a class name for the common icon, you only need the class name begins with icon- can match all icon, save a class name. This way you can reduce some costs, but only in IE7 + browser only apply if you want to use this class selector, then please consider Christmas Beauty iPhone 4 4S Cases whether you need a compatible IE6. Although IE6 does not support, advanced CSS selectors but indeed very attractive and can be used to move the end, it is hereby mention. 3. Graphics reference CSS framework, they will provide some simple graphic elements, but there are different ways to achieve it at each other. But the common denominator is that today's relatively new framework, for some simple effects, will use some simple CSS3 gradients, low versions of IE were graceful degradation. 4. Apply the manner in reference example is the way how to use these frameworks, basic and consistent project we usually used. Michael Kors Handbags In the application, the general two ways. 1. For a component granularity style: structural components in accordance with html to put together their own page module, and then assisted add custom class names to control their individual definitions. 2. For attribute-granularity style: according to the desired pattern corresponding to the class name stitching. Here you can look at a few simple examples: 1 component granularity: For covering the assembly, take regular custom class name overrides the style, not repeat them here. 2. Christmas Angles iPhone 4 4S Cases attribute granularity: You can see, if desired style is a property of granularity, that is transferred to the corresponding class name, but in the actual project, Michael Kors Hot Sale this way due to the flexibility is not enough, and did not do Michael Kors Accessories the structure and style isolated, relatively rare in the actual project such usage. As for the functional action, for example, display / hide elements, can be used flexibly Michael Kors New Arrivals in this way, the desired pattern is written to a specific class name supplied js call, avoid direct written style cause reflow / repaint. 5. Tips for directory organization: directory organization - can be considered in conjunction with Bootstrap Yaml / Blueprint thinking. a. the common basic styles compressed into one file. b. The component styles do not have now pulled out into a separate CSS, demand loading. [Point] optimization reduces the file size of individual global_min. [Point] need to consider trade-offs which may lead to the problem of excessive number of requests. hack-- according to the actual situation, it may be considered a hack for IE6 separate document points out. [Point] to facilitate low-level optimization browser large differences in treatment, and reduce redundancy for advanced browser code. For the CSS specification: CSS prefix - may consider trying Nec way agreement 'single-letter _xxx' as public style logo, cancel a single common prefix as the top by a different letter prefix, to divide the common module. [Point] optimization relief of the 'common prefix _ component _ component name prefix' multi-level prefix by class name format as a logo, to replace the role of the original public prefix. [Point] still need to weigh the actual situation of the project considered. Class division - may consider several functional convention unified class name (in property size class name), Michael Kors Clutches such as an element hidden class name, supply js call. [Point] optimization relief style allows developers to write directly inline CSS, causing reflow / repaint the page. Advanced CSS selectors - When moving reconstruction end pages may consider using more advanced CSS selectors. Example: [class ^ = 'icon'] ,: first-child,:. Nth-child (n) Michael Kors Hamilton ... [dot] compared to traditional optimization methods, saving the class name. For graphics: Consider agreement with designers, visual effects within an acceptable range, part of the effect using CSS3 realize, to achieve a lower browser graceful degradation. [Point] extensive use of optimization to reduce the image, saving bandwidth and the number of requests. Finally, with the emergence of new technology, more and more good CSS framework appeared in front of us, here finite coverage, failed to compare one by one and in-depth exploration, if inadequate, please correct me a lot AC ʱ??can learn from what CSS framework