CSS code formatting and compression methods and techniques

Source: Internet
Author: User

Step 1: You need to understand the abbreviation of CSS
Refer to the followingArticleYou can.
CSS abbreviations optimize the size of CSS files
Examples of common CSS attributes [recommended]
Step 2: Use CSS online formatting and compression tools
Step 3: Test and check whether the compressed CSS file will cause page deformation and other problems. Generally, no, special circumstances are not excluded. Don't forget to back up the style file.

Which of the following is used for CSS compression?CodeIn general, you may like scripts. The two parts above the specific application can be used.

<Meta name = "generator" content = "editplus"> <meta name = "author" content = ""> <meta name = "keywords" content = ""> <meta name = "Description" content = ""> <br/> CSS code formatting and encryption <br/> <HR/> <textarea name = "" rows = "" Cols =" "Style =" width: 600px; Height: 300px; "id =" code "> <br/>/* copy the CSS code here. The following is an example */<br/> input, button {<br/> Height: 20px; Background-color: # ffffff;/* border: 1px solid #333333; */<br/>}< br/> textarea {backgroun D-color: # ffffff; Border: #3872b4 1px solid;} <br/> select {<br/> Height: 20px; font-size: 12px; Background-color: # ffffff; Border: 1px solid #333333; <br/>}< br/> A {<br/>/* color: #794820; color: #000000; */color: # 004f8a; text-Decoration: none; text-transform: Capitalize; <br/>}< br/> A: link {<br/> text-Decoration: none; <br/>}< br/> A: visited {<br/> text-Decoration: none; <br/>}< br/>. input {border: #3872b4 1px s Olid; Height: 20px; line-Height: 20px; font-size: 12px;} <br/># result_dao {<br/> border-Right: # b3cad6 1px solid; padding-Right: 0px; border-top: # b3cad6 1px solid; padding-left: 2px; font-size: 12px; float: Left; padding-bottom: 0px; margin: 2px 0px; border-left: # b3cad6 1px solid; padding-top: 0px; border-bottom: # b3cad6 1px solid; Background-color: # e6eff4; width: 100%; text-align: Left; text-indent: 20px; Co Lor: #333333 ;}< br/># content {<br/> white-space: Pre; <br/>}< br/>/*** RSS ***/<br/>. rss_ B {/* border: 1px solid #99 CCFF; */padding: 1px; line-Height: 18px; font-size: 12px; width: 95px; Height: 18px; text-align: center }< br/>. rss_l {border: 1px solid #99 CCFF; Background: #99 CCFF; margin: 0px; margin-Right: 3px; padding-left: 2px; padding-Right: 2px; color: # ffffff ;}< br/>. rss_a {border: 1px solid #99 CCFF; Background: # e8f3fd; margi N: 0px; padding-left: 1px; padding-Right: 1px; color: # ffffff ;}< br/>. rss_a: link {color: #99 CCFF ;}< br/>. rss_a: visited {color: #99 CCFF ;}< br/>. rss_a: hover {background-color: # e8f3fd; text-Decoration: none; color: #008ed2; Border: 1px solid #99 CCFF ;} <br/>/********** rank **********/<br/>. mo _ {<br/> background-color: # ffffff; width: 48px! Important; width: 50px; Border: 1px solid #99 CCFF; cursor: pointer; text-align: center; font-size: 12px; float: Left; border-top: 1px solid #99 CCFF; border-bottom: 1px solid #99 CCFF; text-Decoration: underline; color: # cccccc;} <br/>. mu _ {<br/> background-color: # e8f3fd; width: 48px! Important; width: 50px; cursor: pointer; text-align: center; font-size: 12px; float: Left; Border: 1px solid #99 CCFF; border-top: 1px solid # ff9966; border-bottom: 1px solid #99 CCFF; text-Decoration: underline ;}< br/>. MS _ {<br/> background-color: # ffffff; Border: 1px solid #99 CCFF; border-top: 1px solid #99 CCFF; border-bottom: 1px solid # ffffff; width: 48px! Important; width: 50px; Height: 25px! Important; Height: 27px; cursor: default; text-align: center; font-size: 14px; line-Height: 25px; float: Left;} <br/>. MX _ {<br/> float: Left; Height: 260px! Important; Height: 250px; <br/>}< br/> # hot_div span {float: Left; Height: 26px! Important; Height: 27px; border-bottom: 1px solid #99 CCFF; width: 2px; <br/>}< br/>. top {background-image: url(bg2.gif); background-position: Center-145px; Background-repeat: Repeat-X; padding-left: 5px; margin-top: 5px; width: 730px; float: Left; margin-left: 8px;/* border: 1px solid # e8f3fd; */border-top: 1px solid #99 CCFF;/* Background-color: # e8f3fd; */padding-bottom: 5px ;}< br/>. top H1 {font-family: Arial, Helvetica, Sans-serif; font-size: 15px; text-indent: 5px ;}< br/>. top Li {float: Left; width: 48%;/* Background-color: # e8f3fd; Height: 20px; */} <br/>. belong_topic {<br/> margin-left: 15px; text-align: center; font-size: 14px; <br/>}< br/> # Article {<br/> margin-left: 10px; width: 700px; margin-top: 20px; Word-break: Break-all; overflow: scroll! Important; overflow: default; float: Left; Background-color: # fafafa; <br/>}< br/># copyright {width: 700px; margin-left: 20px; background-color: # f7f7f7; color: # 8b8b8b; padding: 10px ;}< br/># bd_more {display: None ;}< br/> # page_p_div {width: 100%; padding: auto; text-align: center ;}< br/># page {margin: 0 auto ;} <br/>/* <br/> # I _1 {background-color: # fdf7ff;} <br/># I _1 Li {background-color: # fdf7ff ;} <br/> # I _1 Li {color: #333 ;}< br/> # I _1 Li a {color: #333 ;} <br/> */<br/> # I _1. list2 {border-top: 1px solid # cc00ff; Background-color: # ccccff ;}< br/> # I _1. list2 H1 {color: #333 ;}< br/> # I _1 H3 A {color: #333 ;} </P> <p> <input type = "Submit" onclick = "$ ('code '). value = cssdecode ($ ('code '). value); "value =" format ">|< input type =" Submit "onclick =" $ ('code '). value = cssencode ($ ('code '). value); "value =" encrypted ">
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.