网站模板修改中常用到的CSS代码详解
在上一篇文章中,提到了一些修改网站模板中常用到的方法,工具。但其中也牵涉到不到关于CSS样式表的一些知识,对于这些知识,缺乏的还占大多数,今天我就将常用的一些CSS样式表语法整理一下,发出来给大家,希望对各位站长朋友修改网站模板的时候有一些帮助。如果你还没阅读过上一篇文章,请先移步至《关于淘客模板修改的一些心得总结》。 liehuo.net CSS样式表的出现就是为了规范网页结构,网页中的所有框架,无一例外的都通过CSS样式表来定义其样式,大小、位置,边框位置等……详见下表: veryhuo.com 边框宽度 : border-width : 5px; /网 上边宽度 : border-top-width : 5px; liehuo.net 左边宽度 : border-left-width : 5px; liehuo.net 右边宽度 : border-right-width : 5px; veryhuo.com 底边宽度 : border-bottom-width : 5px; liehuo.net 边框颜色 : border-color : #000000; veryhuo.com 上边颜色 : border-top-color : #000000; veryhuo.com 边框样式 : border-style : double; 可替换 dashed; dotted; none; veryhuo.com 上边样式 : border-top-style : solid; /网 左边样式 : border-left-style : inset; veryhuo.com 右边样式 : border-right-style : ridge; liehuo.net 底边样式 : border-bottom-style : solid; veryhuo.com 整体宽度 : width : 5px; veryhuo.com 整体高度 : height : 5px; veryhuo.com 溢出选项 : overflow : visible; 可替换 hidden; scroll; auto; liehuo.net 内侧边距 : padding : 5px; '网 上内边距 : padding-top : 5px; veryhuo.com 外侧边距 : margin : 5px; liehuo.net 上外边距 : margin-top : 5px; veryhuo.com 文字字体 : font-family : fantasy; liehuo.net 文字大小 : font-size : 12pt; liehuo.net 文字粗细 : font-weight : bold; /网 文字样式 : font-style : italic; &网 文字变量 : line-height : 110%; liehuo.net 清除属性 : clear : left; 可替换 right; both; none; 网 浮动属性 : float : left; 可替换 right; none; wfuwu.com 水平排列 : text-align : left; 可替换 right; center; justify; liehuo.net 文本修饰 : text-decoration : underline; 可替换 overline; underline overline; line-through; blink; veryhuo.com 文本缩进 : text-indent : 5em; liehuo.net 文字间距 : letter-spacing : 5px; veryhuo.com 字母间距 : word-spacing : 5px; -网 文本转换 : text-transform : capitalize; 可替换 lowercase; uppercase; /网 垂直排列 : vertical-align : baseline; 可替换 top; middle; bottom; text-top; text-bottom; super; sub; 3em; 30%; wfuwu.com 背景图片 : background-image : url(tianyi.gif); veryhuo.com 背景拉伸 : background-repeat : repeat; 可替换 repeat-x; repeat-y; no-repeat; veryhuo.com 背景定位 : background-position : left; 可替换 right; top; left top; right bottom; 30% 50%; veryhuo.com 附加属性 : background-attachment : fixed; 可替换 scroll; -网 显示属性 : display : none; 可替换 block; inline; run-in; compact; list-item; marker; &网 是否可见 : visibility : visible; 可替换 hidden; liehuo.net 资源定位 : position : static; 可替换 relative; absolute; fixed; veryhuo.com 距离顶部 : top : 5px; liehuo.net 距离左边 : left : 5px; liehuo.net 距离右边 : right : 5px; veryhuo.com 距离底边 : bottom : 5px; '网 以上就是对于一些常用的CSS语法,然而我们在修改模板的时候用得最多的莫非是 margin-top; margin-left; margin-right; align; background : url(tianyi.gif); border-width : 5px; 这几个平率最高。 liehuo.net 希望这些代码多多少少对各位站长朋友们带来一些帮组,好了,今天的文章就说到这里。不懂的还是自己多动手百度百度。本文来自多彩网 http://www.deluxmart.com,如要转载文章,请保留网址链接,谢谢!如果你还有什么问题,可以去我的网站给我留言。 liehuo.net (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |