标签、样式属性

寻找标签

第一种 class选择器
    .c1{}
    <div class='c1'>aaa</div>
    <div class='c1'>aaa</div>

第二种 标签选择器,为某一类标签(全部)定义
    a{
        color:red;
    }
#这是为所有a标签,html中所有的a标签,全部红色字体
#div,span,select等等都行
# input 特殊
        input[type='text']{
    }
    #为input中所有type='text'的标签加一个样式
    
第三种 ID选择器
    #uu{
        }

<div>aaa</div>
<div id='uu'>aaa</div>

-----------------------------------------------------------------------
以上重要

层级选择器

    #通过绝对路径找到
.c3 a div span{
}
<div>
<a>
<div>
<span></span>
</div>
</a>
</div>

组合选择器
a{}
p{}
a,p{}

#a,p都用这个样式


样式属性

width

height

backgroud

border:边框

display:

none;

block;

inline;

cursor:光标

position:位置

fixed:固定

abslute:绝对

relative:相对

#边距

margin:外边距

padding:内边距














posted @ 2016-04-07 19:24  Bruce_G  阅读(305)  评论(0编辑  收藏  举报