随笔分类 -  精通CSS+div网页样式与布局

摘要:Div于span的区别:div是块级元素。span是行级元素,在它的前后不会换行。Span标记不能包含div标记。盒子模型:content内容 padding间隙 border边框margin间隔。-top,-right,-bootom,-left.盒子模型的实际宽度:content+padding+border+margin注意:在浏览器中 width(height)的值都是width(height)+paddingBorder的主要属性:color,width,style注意:在特定情况下给元素设置background-color时,IE作用域content+border,firefox则 阅读全文
posted @ 2013-02-26 12:51 BaronYan 阅读(259) 评论(4) 推荐(0)
摘要:文字样式字体;字体是通过font-family属性控制的,字体间用逗号隔开。通常见到的"sans-self"和"serif"不是单个字体的名称,而是一类字体的统称文字大小:font-size。该属性的值可以是相对和绝对大小。相对大小(px,%,em)px与显示器分辨率有关,后两个都是相对于父标记而言的比例。文字颜色:color。文字粗细:font-weight斜体:font-style。font-style:normal;默认值。浏览器显示一个标准的字体样式。font-style:italic;浏览器会显示一个斜体的字体样式。 font-style:ob 阅读全文
posted @ 2013-02-22 19:35 BaronYan 阅读(191) 评论(0) 推荐(0)
摘要:选择器标记选择器1 h1{color:red;}类别选择器1 .class{color:red;}2 h3.class{color:red;}//<h3 class="class"></h3>ID选择器1 #id{color:red;}选择器声明集体声明(用口号隔开)1 <style type="text/css">2 <!--3 h1,h2,h3{color:red;}4 -->5 </style>6 7 *{color:red}选择器的嵌套1 <style type="tex 阅读全文
posted @ 2013-02-22 18:04 BaronYan 阅读(201) 评论(0) 推荐(0)
摘要:CSS:Cascading Style Sheet 层叠样式表行内样式 内嵌式 链接式 导入式行内样式<p style="color:#f5f5f5;">正文内容</p>内嵌式<style type="text/css"><!--p{color:red;}--></style>链接式1 <link href="1.css" type="text/css" rel="stylesheet" />导入式1 @import url 阅读全文
posted @ 2013-02-22 17:48 BaronYan