-
Notifications
You must be signed in to change notification settings - Fork 0
html css jquery
1,selector { 属性:值; } 2, 3,选择器分组:h1,h2,p,a {color:red;font-size:14px;} 4,body { color:pink; } ------------------->没定义样式的默认样式。 5,派生选择器,li strong{color:red;} 6, id选择器采用#表示。 7,
html页面:
<title>css index</title> <style> #left{ float:left;} .le{ float:left;}</style>
CSS定位: #position1{ width:100px; height:100px; backgroud-color:blue; position:relative; top:20px; left:20px; z-index;2 }
#positions2{ width:100px; height:100px; backgroud-color:blue; position:relative相对;absolute绝对;fixed; top:20px; left:20px; z-index;1 :谁的大谁排在前面,数值任意。尽量小于100值, }
CSS浮动:float #fs{ width:150px; height:150px; background:blue; float:left; ------浮动属性,没有了块级标签的属性,。 如果每个都是folat属性,将三个图块排在同一行。 可放在主容器中,如果容器的空间不够,就换行。如果去掉浮动属性呢? clear:left; 去掉向左的浮动。 }
#fd{
width:150px;
height:150px;
background:red;
}
#fr{
width:150px;
height:150px;
background:green ;
}
CSS浮动应用: 布局: *{ ----------表示所有 margin:0px; padding:0px; } li{ style:none; }
#div1{ widht:950px; height:auto;------自适应、 margin:20px auto; }
ul{ width:250px; float:left; }
CSS盒子模型
margin1,padding3,border2,content4 height,width:表示content的大小。 Css内边距。 CSS边框;border-style,border-width;border-color;border-radius(圆角); p{ border-radius:10px; width:200px; background-color:aquamarine; text-align:center; border:2px solid blue; }
CSS外边距 .mg{ backgound:blue; width:100px; height:100px; margin-top:90px; }