Chinaunix首页 | 论坛 | 博客
  • 博客访问: 362305
  • 博文数量: 100
  • 博客积分: 2586
  • 博客等级: 少校
  • 技术积分: 829
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-09 15:20
个人简介

我是一个Java爱好者

文章分类

全部博文(100)

文章存档

2014年(2)

2013年(7)

2012年(2)

2010年(44)

2009年(28)

2008年(17)

我的朋友

分类: Java

2010-09-14 17:21:11

css重构1:合并具有相同的属性的选择器
原内容:
h2 {
color: red;
}
.thisOtherClass {
color: red;
}
.yetAnotherClass {
color: red;
}

重构后:
h2, .thisOtherClass, .yetAnotherClass {
color: red;
}


css重构2:嵌套
网页结构如下:

Chocolate curry


This is my recipe for making curry purely with chocolate


Mmm mm mmmmm



嵌套css如下:
#top {
background-color: #ccc;
padding: 1em
}
#top h1 {
color: #ff0;
}
#top p {
color: red;
font-weight: bold;
}
阅读(864) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-15 14:48:36

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com