html CSS笔记

 内容居中             html备注  

  内容居右             html居中对齐          center
 网页的名字                              html两端对齐          justify

换行                                        html左对齐          left

空一行换行  text-decoration: none;清除下划线    html右对齐           right
加粗                                        
  • 项目列表
    倾斜                                        
    1. 编号列表

      创建水平线                                  




          线 颜色 宽度100 右对齐 粗细10 实心                                     float:left    左浮动
                                                          gloat:right  又浮动
           添加空格符号     ©添加版权符号        overfiow   设置溢出隐藏
                                                         
                                                  border:20px solid #07FF3A;定义边框  和写属性


                                    border-top:width style color;   上边框合写
                                      margin         外边距
                                      margin:auto; 块元素居中 
                                      padding        内边距.
                                      box-shadow:0 0 2px #ccc
                                      vertical-align: middle;居中
        display:none; 影藏元素(元素完整消失)
                     
        兄弟选择器
        div~li                 box-shadow:0 1px 3px #666;阴影
        相邻选择器  添加加号
        div+li{ width:100px; height:100px;}


        input:checker{ width:100px; height:100px;} 给按钮添加选中状态


        background-size:100px 200px; 设置背景图片大小
        设置时先给html  body设置宽高
        background-size:cover; 设置背景图片铺满屏幕


        li:nth-of-type(1)控制第一个li


        display:block;将元素转化为块元素   比如a标签




         border-top-left-radius: 4px;设置上左边框圆角





        锚点


        border  边框  
        font-weight: bold;文字加粗
        background-image: url(dot_01.gif); background-repeat: no-repeat; background-position: right bottom;
        插入背景图片  不平铺  控制位置
        background:url(bg1.jpg) #E9FBFF  no-repeat bottom right;}


        dashed虚线           cellspacing单元格间距


        solid实线


        none清除


        text-align: center;块元素居中


        text-decoration: underline;下划线文本


         text-decoration: none;去除下划线


        :last-child最后一个同级别元素
        :first-child第一个同级别元素


         /* 全局样式*/   清除所有内外边距  清除列表前符号样式  清除图片样式


           *{ margin:0; padding:0;}             
            ol,ul{ list-style-type:none;}      
            img{ vertical-align:middle; border:none;} 
            a{ color: #6666; text-decoration: none;}
            input,button{border: none;}
            body{font-family: Arial,宋体;width:100%; height:100%;}
            html{width:100%; height:100%;}
             
                                 




                                      border-right: none;清除右边最后一根边框线
                                      line-height: 设置行高  让图片垂直居中
                                        
                                      ol{ list-style-image:url(加图片地址)}




                                          vertical-align:middle


        百度      添加百度链接
        点我看看        链接到js弹出功能
        返回顶部                                       返回顶部的空标签
                                                   添加锚点


                                                  有序列表
            无序列表  

                                                       列表项



          •                                             自定义列表
                                                         

                                                         
            标题
                                                         

                                                        






                                                         
            块标签  


            行内标签


            11111111111                    
            111111111111111      
            111111111                  
            1111111                

            111111111
                   两端缩进
            11111111                        
            11111111                      
            1111111111                  
            1111111111
                                可以保留空格
            111111111                      

你可能感兴趣的:(前端,html,css)