Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
Page slicing is a very important technology in the process of Web page design, can let the website in the user's browser to download relatively fast, otherwise needs the user browser to download the entire page to be able to open, if the user's temper is more urgent, your website may not have opened, these users can not wait to close the website! If you want to use the page slicing technology, you will inevitably encounter CSS bug problem! For many webmasters, or web designers, once the CSS bug, often make themselves very depressed, because sometimes all day there is no way to find the depth of CSS bug problem!
In the author's opinion, in the web design, the emergence of CSS bugs are often traceable, like a lot of program source code after the bug, we through technical analysis, through the original annotation file, often can find the cause of the bug, in fact, we write web design, to follow a good design habits, For example, code semantics, modularity, code writing standardization, of course, to conform to the web standards, so as to help themselves to avoid a lot of bug problems, there is, then through the annotation and clear code semantics, it is easy to find out where the problem occurred! The following author to analyze the specific method!
One: Check the code word there is no error? is the HTML tag closed?
When we are working on Web design, HTML language specification is to be closed, if only write a header < Head, then the end should have </head > such code to complete the design of the page head! But many designers because of carelessness, often only wrote a head, But ignore the closure, resulting in the appearance of CSS bugs! Of course, this is in the notebook to write the page will appear, now as long as the use of professional web design software, such as Frontpage,dreamweaver, and so on, the code part will be a reminder of color, but for some designers, The first time easy careless, after two times check often can avoid, of course, more web designers in the design of the Web page, the CSS code words less write a letter! So this is often the cause of the problem of CSS bug is the important reason!
Second: Clear container floating
And when you design CSS, accidentally set the container properties to float, it is easy to create a page dislocation, the Web page becomes very confusing, perhaps at first glance, can not, in fact, this is often the container set a float, if each container to look for more trouble, if the use of the following code, It's easy to turn off the container's floating properties!
Clearfix:after{content: "."; display:block; height:0; clear:both; visibility:hidden; text-align:center}.clearfix{ Display:inline-block; * HTML. Clearfix{height:1%}.clearfix{display:block;}
Clearfix:after{content: "."; display:block; height:0; clear:both; visibility:hidden; Text-align:center}
. Clearfix{display:inline-block;
* HTML. Clearfix{height:1%}.clearfix{display:block;}
Third: Other commonly used CSS Bug problem inventory method
For example, this is the most commonly used one, this is one of the common methods of code analysis, through the elimination of the problem will be narrowed down until the end of the reason! However, the elimination method often for web designers, the workload is relatively large, if you can combine the background border debugging method, That is often able to accurately locate the problem module, the CSS bug to find out, then the background border debugging method is how to operate it? In fact, as long as the CSS unit in the design, the relevant background properties to set a different color, so that it can help check the location of the bug position work!
In a nutshell, when you're doing CSS design, must be careful, this is very critical, but also the web designer should pay attention to, to know in the web design, testing maintenance costs, sometimes more than a one-time writing costs, of course, if the semantic code is clear, have good writing habits and annotation habits, That will help to improve the speed of solving all kinds of bugs! The above content by China Hotel Talent Network www.jiudianzhaopin.com in Admin5, reproduced please keep the URL, thank you!