crall

为成为菜鸟而努力···

导航

随笔分类 -  html+css

css重置代码
摘要:body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,th,td,p,pre, form,input,textarea,fieldset,blockquote{ padding: 0; margin: 0; }table { border-collapse: collapse; /*table默认上下两格重叠添加,该属性避免重叠添加*/ border-spacing: 0; /*table默认格与格之间有空隙,该属性是去掉空隙*/}ol,ul { list-style:none; }fieldset,img,abbr,acronym{ border:... 阅读全文

posted @ 2011-09-07 14:21 crall 阅读(375) 评论(0) 推荐(1)

常用的css缩写
摘要:1.字体属性的缩写font-style:italic;font-variant:small-caps;font-weight:bold;font-size:1em;line-height:140%;font-family:”Lucida Grande”,sans-serif;可以缩写为一句:font:italic small-caps bold 1em/140% “Lucida Grande”,sans-serif;注意,如果你缩写字体定义,至少要定义font-size和font-family两个值。2.背景属性的缩写背景的属性如下:background-color:#f00;backgrou 阅读全文

posted @ 2011-09-05 15:19 crall 阅读(889) 评论(0) 推荐(1)

解决position:fixed在IE6下的兼容问题;
摘要:由于在IE6下position:fixed属性不兼容,只能对IE6另取解决办法;以下办法是我在网上收集到得最好的办法,以#bottomRight选择器为目标div来说明;现在要想<div id="bottomRight"></div>固定在网页右下角,不随页面滚动而滚动;在IE6下的方法:*html{background-image:url(about:blank);background-attachment:fixed;}/*这个html,解决页面滚动时出现抖动的现象*/#bottomRight{bottom:0;display:block;hei 阅读全文

posted @ 2011-08-31 11:05 crall 阅读(451) 评论(3) 推荐(0)