zoukankan      html  css  js  c++  java
  • css day2

    1.  背景

      1.1背景的不重复  background-repeat:no-repeat;

        背景的横向重复  background-repeat:repeat-x;

        背景的纵向重复  background-repeat:repeat-y;

      1.2背景固定不随滑轮滑动而消失

        background-attachment:fixed;

      1.3背景放置位置定位

        百分比定位     position:50% 50%

        定位      position:center/top/bottom...(top默认为center top,right默认为center right等)

        像素定位    position:200px 200px

        但是对于火狐来说前两种都不能正常显示,只有加position-attachment:fixed的时候才能正常显示,但是加了fixed就固定了背景,所以推荐使用像素定位

      当整张背景图片上还出现了一张背景图片的时候,第二张图片一定要加no-repeat;

      eg:  background: green url(/i/eg_bg_03.gif) no-repeat fixed center; (在绿色的背景上存在了一张gif)

     2.  文本

      2.1缩进

        1)  css  text-indent:5px;

                text-indent:-5px;  (如果是负数的话,还需要写上padding-left:xxxx; 要不然会超出浏览器的边界)

        2)  css  .tex{100px}

                .p{text-indent:10%}  (缩进采取百分号,一定是上一级父元素的宽度的比例)

            html   <div class="tex"><p>hello world</p></div>

      2.2输入格式

        1)  css  text-decoration:none

        2)  css  text-decoration:underline

        3)  css  text-decoration:overline

        4)  css  text-decoration:line-through

      2.3英文大小写  

        1)text-transform:none;    保持原文大小写

        2)  text-transform:uppercase;    所有字母大写

        3)  text-transform:lowercase;   所有字母小写

        4)  text-transform:capitalize;  所有单词首字母大写

  • 相关阅读:
    http://www.codeplex.com/ 一个不错的开源网站
    阳光灿烂每一天z
    Mercurial使用简单介绍zz
    德国人的记事本 zz
    你一定要知道的71个做饭技巧
    推荐一个原型设计软件 Balsamiq Mockups
    不能一起吃的食物
    雷电预防
    马云 + 史玉柱的40条经典语录zz
    (转)扩展ArcGIS API for Silverlight/WPF 中的TextSymbol支持角度标注
  • 原文地址:https://www.cnblogs.com/swii/p/5329551.html
Copyright © 2011-2022 走看看