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

  • 相关阅读:
    51nod 1494 选举拉票 | 线段树
    51nod 1295 XOR key | 可持久化Trie树
    Codeforces 438D (今日gg模拟第二题) | 线段树 考察时间复杂度的计算 -_-|||
    51nod 1563 坐标轴上的最大团(今日gg模拟第一题) | 线段覆盖 贪心 思维题
    良心的可持久化线段树教程
    51nod 1593 公园晨跑 | ST表(线段树?)思维题
    51nod 1595 回文度 | 马拉车Manacher DP
    51nod 1522 上下序列
    胡小兔的OI日志3 完结版
    51nod 1510 最小化序列 | DP 贪心
  • 原文地址:https://www.cnblogs.com/swii/p/5329551.html
Copyright © 2011-2022 走看看