zoukankan      html  css  js  c++  java
  • 2014.9.20CSS样式表

    一、前景与背景

    background-color: 背景色,定义背景的颜色

     

    background-image:url() 定义背景图片

     

    background-attachment:fixed/scroll 定义背景图片随滚动轴的移动方式

    background-repeat:repeat/no-repeat/repeat-x/repeat-y 定义背景图片的重复方式

    background-position:left 10px bottom 20px; 定义背景图片的位置

    font-family: 定义使用的字体

    font-size: 定义字体的大小(常用字体大小:12px 14px)

    font-weight: 定义字体的粗细(normal:正常 bold:粗体)

    font-style: 定义字体显示的方式(normal:正常 italic:斜体)

    color: 前景色定义文字的颜色

    text-decoration: 定义文本是否有划线以及划线的方式(underline 下划线 ,overline 上划线,line-through 删除线,blink 闪烁,初始值:none 无划线)

    text-indent: 定义文本首行的缩进(在首行文字之前插入指定的长度)(em 倍,百分比)

    text-align: 定义文本的对齐方式( left | right | center)

    vertical-align: 竖直对齐方式

    line-height: 行高

     

    二、边界与边框

    border:border-style,border-width,border-color,border-top,border-right,border-bottom,border-left 定义四个边的宽度,样式,颜色(1px solid  red  1像素红色实线)

    margin:margin-top,margin-right,margin-bottom,margin-left  定义边外补白,只有宽度width一种属性

    padding:padding-top,padding-right,padding-bottom,padding-left 定义边内补白,只有宽度width一种属性

     

    三、列表与方块

    top:

    right:

    bottom:

    left:

    height:

    list-style-type:circle/disc/alpha/none 定义列表样式 圆圈/点/字母/无样式

    list-style-image:url() 定义列表样式图片

    list-style-position:inside/outside 定义列表样式的位置  内部/外部

     

    四、格式与布局

    position:fixed(生成绝对定位的元素,相对于浏览器窗口进行定位。 )/absolute(生成绝对定位的元素,相对于 static 定位以外的第一个父元素进行定位。 )/relative(生成相对定位的元素,相对于其正常位置进行定位。 ) -------------top,right,bottom,left

    z-index:

    float:left,right 向左浮动,向右浮动

    clear:both 规定元素的哪一侧不允许其他浮动元素,both在左右两侧均不允许浮动元素。

    display:显示方式。block/inline/none/inline-block block此元素将显示为块级元素,此元素前后会带有换行符。(块)在span层会起作用inline默认。此元素会被显示为内联元素,元素前后没有换行符。在一行上。none此元素不会被显示。inline-block行内块元素。

    visibility:可视性。hidden元素是不可见的。 ,visible默认值。元素是可见的。

     

    五、超链接的

    a:link 没访问过的

    a:visited 访问过的

    a:hover 鼠标放上变的颜色

  • 相关阅读:
    mybatis 动态sql
    linux shell 之 crontab(定时任务)详解
    FTP定时批量下载文件(SHELL脚本及使用方法 )
    腾讯云数据库团队:MySQL5.7 JSON实现简单介绍
    Chisel Tutorial(七)——模块
    大数问题解决模板
    可靠的功能測试--Espresso和Dagger2
    hdoj 1698 Just a Hook 【线段树 区间更新】
    平衡二叉树
    WPF中DependencyObject与DependencyProperty的源代码简单剖析
  • 原文地址:https://www.cnblogs.com/zsmj001/p/3984719.html
Copyright © 2011-2022 走看看