读书笔记《CSS Mastery》

1、关于float的那些事儿

  例子: <div class="img-wrapper"></div>

  ① 当创建一个div时,如果其中不包含任何内容,也不定义div的长宽。这时的div在界面上不占任何空间,类似于隐藏。

  ② 当给div中加入任何内容的时,div会水平伸展,占据所有横向可用空间

  ③ 当给div设置浮动时(float:left|right),div会出现“收缩包围”其中内容的效果。

2、CSS视差效果

  利用多个背景图片叠加在一起(可以使用css3多背景图像特性,也可以添加3个元素来应用背景)。

  除了最底层的图片不是透明的,其他图片都是alpna透明的。

  设置图片background相关属性,比如background-repeat:repeat-x; background-position:20% 0; 水平偏移百分比越大,改变窗口大小时移动越快。(百分比可以大于100%)

3、突出显示导航条中当前页面

  以前我常用的方法是给当前页面的导航条单独添加一个class(如:focus),来设置特定的css样式。还要清除其他导航条包含(focus)的class。

  书中介绍了一种方法:通过在每个页面的主体元素(如:body)中添加一个ID或class,指出用户当前在哪个页面或部分中。然后再导航列表中的每个项中添加一个对应的ID或class。可以使用主体的ID和列表ID/class的唯一组合在站点导航中突出显示当前部分或页面。

  例子:

<body id="home">
  <ul class="nav">
    <li class="home"><a href="home.html">Home</a></li>
    <li class="news"><a href="news.html">Home</a></li>
    <li class="work"><a href="work.html">Home</a></li>
  </ul>
</body>

<style>
    #home .nav .home a,
    #news.nav .home a,
    #work.nav .worka{
        background-position:right bottom;
        color:#fff;
    }
</style>

 

转载于:https://www.cnblogs.com/connie1120/archive/2013/05/07/3064264.html

简介 · · · · · ·   You'll learn how to:   Plan, organize, and maintain your stylesheets more effectively   Apply the secrets of liquid, elastic, and hybrid layouts   Create flickr™-style image maps, remote rollovers, and other advanced CSS features   Lay out forms using pure CSS   Recognize common browser bugs, and how to fix them   While CSS is a relatively simple technology to learn, it is a difficult one ... (展开全部)   You'll learn how to:   Plan, organize, and maintain your stylesheets more effectively   Apply the secrets of liquid, elastic, and hybrid layouts   Create flickr™-style image maps, remote rollovers, and other advanced CSS features   Lay out forms using pure CSS   Recognize common browser bugs, and how to fix them   While CSS is a relatively simple technology to learn, it is a difficult one to master. When you first start developing sites using CSS, you will come across all kinds of infuriating browser bugs and inconsistencies. It sometimes feels like there are a million and one different techniques to master, spread across a bewildering array of websites. The range of possibilities seems endless and makes for a steep and daunting learning curve.   By bringing all of the latest tips, tricks, and techniques together in one handy reference, this book demystifies the secrets of CSS and makes the journey to CSS mastery as simple and painless as possible. While most books concentrate on basic skills, this one is different, assuming that you already know the basics and why you should be using CSS in your work, and concentrating mainly on advanced techniques.   It begins with a brief recap of CSS fundamentals such as the importance of meaningful markup, how to structure and maintain your code, and how the CSS layout model really works.   With the basics out of the way, each subsequent chapter details a particular aspect of CSS-based design. Through a series of easy-to-follow tutorials, you will learn practical CSS techniques you can immediately start using in your daily work. Browser inconsistencies are the thorn in most CSS developers' sides, so we have dedicated two whole chapters to CSS hacks, filters, and bug fixing, as well as looking at image replacement; professional link, form, and list styling; pure CSS layouts; and much more.   All of these techniques are then put into practice in two beautifully designed case studies, written by two of the world's best CSS designers, Simon Collison and Cameron Moll. 
由于本书压缩质量比较好,所以格式比较大,40MB多,我分了6段压缩大家可以按精通CSS(css mastery)中文版 part1精通CSS(css mastery)中文版 part2精通CSS(css mastery)中文版 part3精通CSS(css mastery)中文版 part4 精通CSS(css mastery)中文版 part5精通CSS(css mastery)中文版 part6这些文件名搜索一下,然后下载,解压缩会自动解成一个文件,辛苦了!!本书将最有用的CSS技术汇总在一起,在介绍基本的CSS概念和最佳实践之后,讨论了核心的CSS技术,例如图像、链接、列表操纵、表单设计、数据表格设计以及纯CSS布局。每一章内容由浅入深,直到建立比较复杂的示例。之后本书用两章讨论招数、过滤器、bug和bug修复,最后由Simon Collison和Cameron Moll两位杰出的CSS设计人员,将书中讨论的许多技术组合起来,给出了两个实例研究。本书还集中介绍了现实的浏览器问题,是弥补CSS知识欠缺不可或缺的参考书。 本书适合具有(X)HTML和CSS基本知识的任何网页设计人员阅读。本书将最有用的CSS技术汇总在一起,在介绍基本的CSS概念和最佳实践之后,讨论了核心的CSS技术,例如图像、链接、列表操纵、表单设计、数据表格设计以及纯CSS布局。每一章内容由浅入深,直到建立比较复杂的示例。之后本书用两章讨论招数、过滤器、bug和bug修复,最后由Simon Collison和Cameron Moll两位杰出的CSS设计人员,将书中讨论的许多技术组合起来,给出了两个实例研究。本书还集中介绍了现实的浏览器问题,是弥补CSS知识欠缺不可或缺的参考书。本书适合具有(X)HTML和CSS基本知识的任何网页设计人员阅读。
终于完了~这是最后一个压缩卷~辛苦大家了由于本书压缩质量比较好,所以格式比较大,40MB多,我分了6段压缩大家可以按精通CSS(css mastery)中文版 part1精通CSS(css mastery)中文版 part2精通CSS(css mastery)中文版 part3精通CSS(css mastery)中文版 part4 精通CSS(css mastery)中文版 part5精通CSS(css mastery)中文版 part6这些文件名搜索一下,然后下载,解压缩会自动解成一个文件本书将最有用的CSS技术汇总在一起,在介绍基本的CSS概念和最佳实践之后,讨论了核心的CSS技术,例如图像、链接、列表操纵、表单设计、数据表格设计以及纯CSS布局。每一章内容由浅入深,直到建立比较复杂的示例。之后本书用两章讨论招数、过滤器、bug和bug修复,最后由Simon Collison和Cameron Moll两位杰出的CSS设计人员,将书中讨论的许多技术组合起来,给出了两个实例研究。本书还集中介绍了现实的浏览器问题,是弥补CSS知识欠缺不可或缺的参考书。 本书适合具有(X)HTML和CSS基本知识的任何网页设计人员阅读。本书将最有用的CSS技术汇总在一起,在介绍基本的CSS概念和最佳实践之后,讨论了核心的CSS技术,例如图像、链接、列表操纵、表单设计、数据表格设计以及纯CSS布局。每一章内容由浅入深,直到建立比较复杂的示例。之后本书用两章讨论招数、过滤器、bug和bug修复,最后由Simon Collison和Cameron Moll两位杰出的CSS设计人员,将书中讨论的许多技术组合起来,给出了两个实例研究。本书还集中介绍了现实的浏览器问题,是弥补CSS知识欠缺不可或缺的参考书。本书适合具有(X)HTML和CSS基本知识的任何网页设计人员阅读。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值