zoukankan      html  css  js  c++  java
  • 9)

    1. background-position   ( 雪碧图 )

              HTML和CSS中有一个属性可以向服务器发送请求:src  href  url

              雪碧图优点:

                       本多次需要向浏览器请求的图片,一次就请求过来了,使用background:position调整,从而减少了该页面向服务器请求的次数,间接优化了该页面性能

    2. overflow

             值hidden超出就隐藏

             值scroll出现滚动条

             visibility :hidden ; 可见的消失但占用位置

             display :none ; 消失但不占用位置

    3. 如何实现浏览器中的小图标

           需要借鉴link标签:

           link标签的标签属性?     rel     type    href

           rel——是当前页面和url之间的关系     rel= “ stylesheet ”

           type——是资源文件的mime类型

                         mime:类型是根据拓展名而定的( 客户端与服务器之间的暗号 )

             * html文件mime类型是 text / html

             *图片mime类型是 images / .jpg .png .gif

             *css的mime类型是 text / css

             *js的mime类型是 text / javascript

    < link      rel = " shortcut  icon "     href = " favaicon.ico "  /  >         ( title中的小图标就出来了 ,href这里不能写./ )

    4. 项目的完整目录

              css    images    js     favicon.ico     index.html

    5. 不让文本域被人为拉伸

                      textarea{

                                       resize:none;

                                    }

    6. 让表格边框变细

                    table{

                               border-collapse;

                            }

    7. font的简写

                    body{

                              font :12px / 150%    arial  ,   verdana,     " / 5b8b / 4f53"

                               color : #666;

                               background : #fff;

                             }

    8. 清除浮动的兼容性

                    . clearfix {

                                     * zoom : 1 ;

                                     }

                  清除浮动在低版本IE7/6 浏览器不行需处理兼容性,加 . clearfix { * zoom : 1 ;}

    9. 光标的形状

                sursor光标的属性值—— pointer( 抓手 )     wait ( 等待 )        help ( ?)

    10. RGB    RGBA    OPACITY

           rgb——颜色表示方法值是0-255,如 background: rgb ( 12,15 ,16 )

           opacity——表示透明度值是0-1

                                #aa{

                                     width:100px;

                                     height:100px;

                                     background: rgb ( 12,15 ,16 );

                                      opacity:0.5;

                                      filter:alpha( opacity =50 );               --------filter是IE低版本处理透明度兼容性的写法

                                       }

            rgba——r-red   0-255

                          g-green   0-255

                          b-blue    0-255

                          a-opacity   IE低版本不支持

    * rgb和 opacity 与 rgba 的区别:

                     rgb前者的内容也跟着透明;rgba后者内容不跟着透明,内容包含图片和文字  

  • 相关阅读:
    浏览器HTML5支持程度测试
    Unit testing Cmockery 简单使用
    Linux likely unlikely
    Android development tools line_endings hacking
    Linux C enum
    Android 系统内置App JNI
    Android Broadcast Receiver
    Android获取SharedPreferences失败,且App无法启动
    Sublime-text markdown with Vim mode and auto preview
    遍历Map key-value的两种方法
  • 原文地址:https://www.cnblogs.com/xiaotaiyangye/p/9720461.html
Copyright © 2011-2022 走看看