西安力洋网站建设

西安力洋网络
  • 网站模板修改中常用到的CSS代码详解

  • 发布者:本站 发布时间:2011/8/27 20:58:22
  • CSS样式表的出现就是为了规范网页结构,网页中的所有框架,无一例外的都通过CSS样式表来定义其样式,大小、位置,边框位置等……详见下表:

      边框宽度 : border-width : 5px;

      上边宽度 : border-top-width : 5px;

      左边宽度 : border-left-width : 5px;

      右边宽度 : border-right-width : 5px;

      底边宽度 : border-bottom-width : 5px;

      边框颜色 : border-color : #000000;

      上边颜色 : border-top-color : #000000;

      边框样式 : border-style : double; 可替换 dashed; dotted; none;

      上边样式 : border-top-style : solid;

      左边样式 : border-left-style : inset;

      右边样式 : border-right-style : ridge;

      底边样式 : border-bottom-style : solid;

      整体宽度 : width : 5px;

      整体高度 : height : 5px;

      溢出选项 : overflow : visible; 可替换 hidden; scroll; auto;

      内侧边距 : padding : 5px;

      上内边距 : padding-top : 5px;

      外侧边距 : margin : 5px;

      上外边距 : margin-top : 5px;

      文字字体 : font-family : fantasy;

      文字大小 : font-size : 12pt;

      文字粗细 : font-weight : bold;

      文字样式 : font-style : italic;

      文字变量 : line-height : 110%;

      清除属性 : clear : left; 可替换 right; both; none;

      浮动属性 : float : left; 可替换 right; none;

      水平排列 : text-align : left; 可替换 right; center; justify;

      文本修饰 : text-decoration : underline; 可替换 overline; underline overline; line-through; blink;

      文本缩进 : text-indent : 5em;

      文字间距 : letter-spacing : 5px;

      字母间距 : word-spacing : 5px;

      文本转换 : text-transform : capitalize; 可替换 lowercase; uppercase;

      垂直排列 : vertical-align : baseline; 可替换 top; middle; bottom; text-top; text-bottom; super; sub; 3em; 30%;

      背景图片 : background-image : url(tianyi.gif);

      背景拉伸 : background-repeat : repeat; 可替换 repeat-x; repeat-y; no-repeat;

      背景定位 : background-position : left; 可替换 right; top; left top; right bottom; 30% 50%;

      附加属性 : background-attachment : fixed; 可替换 scroll;

      显示属性 : display : none; 可替换 block; inline; run-in; compact; list-item; marker;

      是否可见 : visibility : visible; 可替换 hidden;

      资源定位 : position : static; 可替换 relative; absolute; fixed;

      距离顶部 : top : 5px;

      距离左边 : left : 5px;

      距离右边 : right : 5px;

      距离底边 : bottom : 5px;

      以上就是对于一些常用的CSS语法,然而我们在修改模板的时候用得最多的莫非是 margin-top; margin-left; margin-right; align; background : url(tianyi.gif); border-width : 5px; 这几个平率最高。

      希望这些代码多多少少对各位站长朋友们带来一些帮组,好了,今天的文章就说到这里。不懂的还是自己多动手百度一下。

  • 返回列表
    相关阅读
    更多
    深度挖掘网站的商用价值,化繁为简的设计,为企业找到直接有效的解决方案
    +86 (029) 88765320
    +86 15829904657
    地址:西安市未央区文景路11号
    星舍大厦5F P.C:7100001
    boss@178365.net
    在线咨询: 985224206
    中国互联网协会成员单位
    西安力洋之星网络技术有限公司 | 版权所有
    Copyright 2008-2020 Liyang.Inc All Rights Reserved.
    Liyang.Inc