zoukankan      html  css  js  c++  java
  • 8)

    1. position细说

               position:relative;                          position:absolute;

               left:100px                                       left:100px

               top:100px                                       top:100px

               position:relative;如果说设值了,相对原来的位置进行调整

    二者区别——

             absolute会脱离标准文档流,relative不会,relative虽然给值了,但是依然占有着原来的位置;

             relative存在“形影分离”,所以一般情况下不建议添加值,一般给子元素当参照物,或者元素的微调;

             absolute会有一种现象“压盖”效果;

          *z-index层次关系,可以改变元素的层叠位置,所以的标签默认是0,z-index值越大,该元素就在上方

          *以后我们做定位的时候尽量保持“子绝父相”

    2. fixed    固定定位

    position:fixed;

                      . head {

                                   position:fixed;

                                   top:0;

                                   bottom:0;

                                   background:red;

                                   height:60px;

                                   width:100px;

                                 }

    使文档脱离标准文档流属性:

                 float    position:absolu;      position:relative;          position:fixe;

    3. form    表单

              < form   action= "  "      method= "  " >

                              < input     type= "  submit "     value="  "  />

              < / from >

    action 提交的地址:https://www.baidu.com

    method 提交方式:

                     post :加密在http中的一个body对象上提交的

                     get:是在http的url上提交不加密

     4. 类型

         < input    type= "  text  "  / >        文本框标签

          < input    type= "  password  "  / >        密码框

         < input    type= "  radio "  / >        单选框

         < input    type= "  checkbox "  / >        多选框

         < input    type= "  buttom "  / >        普通按钮

        < input     type= "  submit "     value=" 提交 "  />           提交按钮

    * http是一种协议,就是客户端跟服务端链接的一种协议( 超文本传输协议 )

    5. 下拉列表  select

        < select   name= " city " >

           < option     value= " 北京 " >北京< / option >

                          < option     value= " 上海 " >上海< / option >

                < / select >

    6. 定位让元素居中:

          div {

             width : 200px;

             height : 300px;

             background : red;

             position :absolute;

             left : 50%;

             top : 50%;

             margin-left : -100px;

             margin-top : -150px;

    }

    7. 透明度  opacity

        默认值是  1不透明   0全透明

             

  • 相关阅读:
    ocx文件转换成C#程序引用的DLL
    CSS颜色代码 颜色值 颜色名字大全(转载)
    WinForm轻松实现自定义分页 (转载)
    如何:使用PicturBox实现类似淘宝网站图片的局部放大功能
    转载jQuery图片放大插件[twiPicZoom]
    LINQ查询返回DataTable类型
    最喜欢的VS 键盘快捷键摘抄
    Codeforces Round #336 (Div. 2)B 暴力 C dp D 区间dp
    Educational Codeforces Round 24 A 水 B stl C 暴力 D stl模拟 E 二分
    poj 1185 状态压缩
  • 原文地址:https://www.cnblogs.com/xiaotaiyangye/p/9709669.html
Copyright © 2011-2022 走看看