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;  所有单词首字母大写

  • 相关阅读:
    mysql-5-aggregation
    mysql-4-functions
    mysql-3-orderby
    技术之心 | 云信和TA们携手打响防疫战
    疫情下的传统商企自救|4个Tips搭建销量过亿直播间
    那些2019年会爆发的泛娱乐黑科技风口
    流量难、获客难、增长难?增长黑客思维“解救”B端业务
    【翻译】Facebook全面推出Watch Party,可多人线上同看直播视频
    深入浅出聊一聊Docker
    C++写日志方法调试
  • 原文地址:https://www.cnblogs.com/swii/p/5329551.html
Copyright © 2011-2022 走看看