Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Coding specifications for css and JS

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article is about the coding specifications of css and JavaScript. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

1. Naming following the Protal-related css and JS coding specifications class requires the use of the project name plus "-" and specific naming. For example: jx-news-title. Try not to modify and override the default style of SharePoint

Other coding specifications need to follow the CSS coding specification.

Example:

/ Bad CSS / .selector, .selector-secondary, .selector [type=text] {padding:15px; margin:0px 0px 15px; background-color:rgba (0,0,0,0.5); box-shadow:0px 1px 2px # CCC,inset 0 1px 0 # FFFFFF}

/ Good CSS / .selector, .selector-secondary, .selector [type= "text"] {padding: 15px; margin-bottom: 15px; background-color: rgba; box-shadow: 0 1px 2px # ccc, inset 0 1px 0 # fff;}

two。 To consider the network delay, js and css need to be confused and compressed.

The original js and css can be used during development, but once provided to customers, js and css need to be confused and compressed, which can greatly reduce the size of javascript and css files. When the network delay is relatively large, the corresponding files can be loaded quickly.

On css and JS coding specifications to share here, I hope the above can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report