MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

How to play the role of CSS 2.0

Source: Shangpin China | Type: website encyclopedia | Time: July 29, 2014
The application of css is the focus of this article and an important part of the transition to Web standards. Compared with the structural design, the style design of the presentation layer is richer and more difficult to master. For the ever-changing web page design, how to code the design into a style language that can be recognized by the machine is also the focus of CSS. The rich style expression of Css also puts forward higher requirements for designers. In view of the requirements for the transition to Web standards, here are some suggestions and requirements for the writing of CSS, which will be discussed in detail in later chapters.

1. Reasonable CSS file structure
Although CSS achieves the separation of style design and content, the CSS file itself should also have a good hierarchy and specification, in order to further replace the maintainability of style design. CSS itself supports the Import function, which is aimed at large Website Design You can use separate CSS files to organize styles. For example, font styles are specially written in the font.css file, and form designs are placed in the form.css file. By reasonably organizing these files, it can bring convenience for later maintenance, and also facilitate the website program to call files according to the browser version or terminal device, further improving the cross platform response capability of CSs.

2. Advantages of inheritance and reuse
The advantage of using CSs is its good reusability. A piece of CSs design code can be used by multiple areas at the same time. In addition to the tortoise function, CSs can also implement an inheritance mechanism similar to that in object-oriented programming, which can further improve the style structure of websites. For example, in the XHTML corresponding to CSs, the insulting tags always use their own tag style design first, and then use the parent tag style, so that part of the code can be placed in each level separately, and they play a role in each other; The unified code is placed in the top label. By using this function with inheritance mechanism, we can further reduce the amount of code in style design and further improve the design method.

3. Design cross platform code
CSS also has its drawbacks. Due to the different ways of rendering between browsers of different brands and different versions, there are also some differences in the interpretation of CSS by different browsers. Some old versions of browsers (such as IE4.0 and IE5.0) are still used by many users who do not want to upgrade. In addition, the browser products under PC F and MAC are ignored. For these reasons, CSS design should also have certain cross platform compatibility features, and the use of obscure attributes should be minimized when coding. If you want to be compatible with older versions of browsers, you should also pay attention to leaving some CSS hack code.

4. Css style design with good usability
With the development of human-computer interaction technology, usability expands its content and form. The goal of usability is to make our interactive products (software, website) meet the needs of users to the maximum extent, so that the products can be more easily used by users. It fundamentally changes the subjective process of interaction between users and products, improves the value of products, and brings benefits to both products and users. CSS, as the style design code, also contains the design content of usability.
The design of CSS style means that your grasp of the overall style of the website needs to be reconsidered. From the perspective of visual design, in order to achieve maximum reuse and reasonable texture, you need a unified font, font size and layout form. These unified designs are conducive to improving the usability of visual design. The detailed performance on the website, such as link change prompt, link area, navigation sense of operation, etc., are also the goals of CSS usability design. The ultimate goal is to create a better interactive website through good design, so that users can use it and create value for the website and users.

5. Use the basic DOM scripting language to write interactions
DOM is also created to realize cross platform and cross browser applications of scripting languages. The DOM (Document Object Model) is a browser independent interface developed by the W3C. It can technically standardize the standard components (such as HTML tags) in web pages, which can be accessed by scripting languages, provided that the browser supports this DOM based definition specification.
For now, most browsers support standard DOM. Using a script language that conforms to the DOM, it is basically no longer necessary to check different versions of the browser and write several sets of different codes. As long as the browser conforms to the DOM, the same code can complete all supported operations. The current javascript is a script language that conforms to the DOM standard. For more information about DOM, you can visit the W3C DOM column: //www.w3.org/dom
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]