HTML5 - demo

demo-1 京东

base.css

@charset "UTF-8";
/*css 初始化 */
html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img { margin:0; padding:0; }
fieldset, img,input,button { border:none; padding:0;margin:0;outline-style:none; }
ul, ol { list-style:none; }
input { padding-top:0; padding-bottom:0; font-family: "SimSun","宋体";}
select, input { vertical-align:middle; }
select, input, textarea { font-size:12px; margin:0; }
textarea { resize:none; } /*防止拖动*/
img {border:0; vertical-align:middle; }  /*  去掉图片低测默认的3像素空白缝隙*/
table { border-collapse:collapse; }
body {
    font:12px/150% Arial,Verdana,"\5b8b\4f53";
    color:#666;
    background:#fff
}
.clearfix:before,.clearfix:after{
    content:"";
    display:table;
}
.clearfix:after{clear:both;}
.clearfix{
    *zoom:1;/*IE/7/6*/
}
a{color:#666; text-decoration:none; }
a:hover{color:#C81623;}
h1,h2,h3,h4,h5,h6{text-decoration:none;font-weight:normal;font-size:100%;}
s,i,em{font-style:normal;text-decoration:none;}
.col-red{color: #C81623!important;}

/*公共类*/
.w {  /*版心 提取 */
    width: 1210px;margin:0 auto;
}
.fl {
    float:left
}
.fr {
    float:right
}
.al {
    text-align:left
}
.ac {
    text-align:center
}
.ar {
    text-align:right
}
.hide {
    display:none
}
.headcut{
    /*height: 30px;*/
    line-height: 30px;
    background-color: #f1f1f1;
    width: 100%;
}
.headcut .w{
    background-color: #f1f1f1;

}
.headcut li{
    float: left;
    padding: 0 10px;
}
.headcut .tel-li{
    padding-left: 27px;
}
.tel-li .tel-icon{
    width: 15px;
    height: 20px;
    background: url("./images/jd2015img .png");
    position: absolute;
    top:5px;
    left: 7px;
}
.headcut .spacer{
    width: 1px;
    height: 12px;
    padding: 0;
    background-color: #DDD;
    margin-top: 9px;
}
.headcut .dropdown{
    position: relative;
    padding-right: 25px;


}
.dropdown i{
    position: absolute;
    width: 15px;
    height: 9px;
    overflow: hidden;
    /*display: inline-block;*/
    top: 12px;
    right: 6px;

}
.dropdown s{
    position: absolute;
    font: 400 15px/15px consolas;
    color: #6A6A6A;
    top: -6px;
    left: 0;

}

index.html




    
      
      
    京东
     rel="stylesheet" href="base.css">
     rel="stylesheet" href="index.css">
     rel="shortcut icon" href="favicon.ico">





      
      

      
      







demo-2 qq注册




    
   
   
    qq注册
    





   
   
用户注册 用户名:

密码:

性别:

出生地:省: 市:


  • 兴趣爱好: 喝酒 打牌 洗澡

    自我介绍:

    头像:



  • 总结1:block,inline和inlinke-block 区别

    • display:block
      1. block元素会独占一行,多个block元素会各自新起一行。默认情况下,block元素宽度自动填满其父元素宽度。
      2. block元素可以设置width,height属性。块级元素即使设置了宽度,仍然是独占一行。
      3. block元素可以设置margin和padding属性。
    • display:inline
      1. inline元素不会独占一行,多个相邻的行内元素会排列在同一行里,直到一行排列不下,才会新换一行,其宽度随元素的内容而变化。
      2. inline元素设置width,height属性无效。
      3. inline元素的margin和padding属性,水平方向的padding-left, padding-right, margin-left, margin-right都产生边距效果;但竖直方向的padding-top, padding-bottom, margin-top, margin-bottom不会产生边距效果。
    • display:inline-block
      1. 简单来说就是将对象呈现为inline对象,但是对象的内容作为block对象呈现。之后的内联对象会被排列在同一行内。比如我们可以给一个link(a元素)inline-block属性值,使其既具有block的宽度高度特性又具有inline的同行特性。

    总结2:



      总结3:


        总结4: CSS position 属性
        static 是默认值

        relative 相对于父类

        fixed 是以为相对于浏览器窗口Window进行定位

        总结5: css中width:auto和width:100%的区别
        https://my.oschina.net/u/2428791/blog/505234?p={{currentPage+1}}



        评论
        添加红包

        请填写红包祝福语或标题

        红包个数最小为10个

        红包金额最低5元

        当前余额3.43前往充值 >
        需支付:10.00
        成就一亿技术人!
        领取后你会自动成为博主和红包主的粉丝 规则
        hope_wisdom
        发出的红包
        实付
        使用余额支付
        点击重新获取
        扫码支付
        钱包余额 0

        抵扣说明:

        1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
        2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

        余额充值