当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > CSS代码优化的两个原因

CSS样式表
css列表前的小方块
解决div被flash挡住的设置方法
input file 不能更改value值的解决办法
图片垂直居中之姊妹 DIV垂直居中
div的dispaly:inline样式 和span的区别
CSS控制图片大小-适应宽度
CSS 浮动清理,不使用 clear:both标签
css设置字间距
CSS 美化段落文本之首字下沉
浅谈html中id和name的区别实例代码
CSS布局中可以用javascript判断浏览器版本
div css nowrap无换行
css 不换行 自动换行 强制换行的实现方法
css ol有序列表
div层跨越iframe帧显示在上面的解决方法附代码
css创意ul+li实现的细线表格实现代码
css层固定位置练习
提高CSS网页渲染效率的11点注意事项
css expression 隔行换色
不错的整理的24则css技巧

CSS样式表 中的 CSS代码优化的两个原因


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-28   浏览: 85 ::
收藏到网摘: n/a

 为什么进行CSS代码优化呢?

  好,有两个原因。它可以帮助你变得更小的CSS文件大小和更好的写的代码。这个方法的优化工作实际,让你决定你想要多少压缩。从超压(几乎读和编辑被人类)视觉愉悦。我喜欢这个标准设置,因为它会给你一个小的。
  
  另一个凉爽的特征是,它能帮助你用速记编码。我绝不是一位专家在样式表。我并不拥有所有的速记记方法(!)。对于那些你使用Dreamweaver,就像我一样,你会发现它喜欢用草书代码。我的意思是相互独立的角色的线。这能让单调乏味的复制和粘贴它做一些小改变。很多东西可以变成一个线,如背景和边界。
  
  所以你要优化的主要原因是,确保你的CSS文件都是干净的。有一定的艺术形式在干净、简洁的代码。我甚至没有一个程序员,我能看到。我是一个艺术家,所以这个工具确实有助于提高速度。

 Why CSS optimize?

  Well for two reasons mainly. It helps you get smaller CSS file sizes and better written code. The way the optimizer works actually lets you decide how much compression you want. From super compressed (virtually unreadable and editable by a human being) to visually pleasing. I prefer the standard setting because it gives you a little of both.

  Another cool feature is that it helps you with shorthand coding. I am by no means an expert at CSS. I do not have all the shorthand methods memorized (yet!). For those of you using Dreamweaver, like myself, you'll find that it likes to use longhand code. By this I mean putting each seperate rule on it's own line. This can get tedious copying and pasting it make a small change. A lot of that stuff can get consolidated into one line, like backgrounds and borders.

  So your main reasons for wanting to optimize are to make sure your CSS files are clean. There is a certain art form in clean and concise code. And I'm not even a programmer and I can see that. I'm an artist, so this tool really helps speed things up.