CreateTime--2017年11月13日09:03:00

Author:Marydon

background-color

1.定义

  设置背景颜色

2.语法

  2.1 使用16进制,以"#"号开头    

  说明:

    "#"号后面的6位数如果完全相同的话,可以省略3位,如:#fff 即可;

    用字母表示的不区分大小写。

  举例:

/* 设置背景色为白色 */
background-color:#FFFFFF

  2.2 使用rgb()

  说明:

    rgb(num1,num2,num3),三个参数分别表示红,绿,蓝

  举例:

/* 设置背景色为黑色 */
background-color:rgb(0,0,0)

  2.3 使用rgba()    

  说明:

    rgba(num1,num2,num3,range),三个参数分别表示红,绿,蓝,透明度;

    range的区间为[0,1],即[透明,不透明],小数值越大,越不透明;反之,透明度越高。

  举例:

/* 背景色为黑色,并设置半透明 */
background-color:rgba(0,0,0,0.5)

  

 

background-color的更多相关文章

  1. unity Changing Game View background color

    Change the background color in the camera 参考:http://forum.unity3d.com/threads/changing-game-view-bac ...

  2. android:background="@color/white" [create file color.xml at res/values/]

     <resources><color name="white">#FFFFFF</color><!--白色 --><col ...

  3. How to change the header background color of a QTableView

    You can set the style sheet on the QTableView ui->tableView->setStyleSheet("QHeaderView:: ...

  4. javascript改变背景/字体颜色(Through the javascript to change the background and font color)

    鼠标移动到.移出DIV时修改DIV的颜色: 1.Change the font and Div background color--function <div style="width ...

  5. 【转】c#、wpf 字符串,color,brush之间的转换

    转自:http://www.cnblogs.com/wj-love/archive/2012/09/14/2685281.html 1,将#3C3C3C 赋给background this.selec ...

  6. CSS3详解:background

    CSS3对于background做了一些修改,最明显的一个就是采用设置多背景,不但添加了4个新属性,并且还对目前的属性进行了调整增强. 1.多个背景图片 在css3里面,你可以再一个标签元素里应用多个 ...

  7. C#中Brush、Color、String相互转换WPF/Silverlight

    //部分方法只适用于WPF,在SL中不能用 using System.Windows.Media; 1.String转换成Color Color color = (Color)ColorConvert ...

  8. windows cmd color setup

    设置颜色的话,一般可定会有foreground和background color设置:(其实color /?直接看一下就好了) Color Background Foreground Black 0 ...

  9. Brush、Color、String相互转换

    using System.Windows.Media; 1.String转换成Color Color color = (Color)ColorConverter.ConvertFromString(s ...

  10. String、Brush、Color 相互转换

    1.String转换成Color Color color = (Color)ColorConverter.ConvertFromString(string); 2.String转换成Brush Bru ...

随机推荐

  1. web开发框架之Django基础

    在脚本中如何进行Django的运行 if __name__ == '__main__': import os import django # 注意路径(当前所在的位置,要加载Django的配置文件) ...

  2. Python9-day4 作业

    #!/usr/bin/env python# -*- coding:utf-8 -*-# Author:Timli = ["alex", "eric", &qu ...

  3. Bin Paking Problem:简单的构造性算法

    *本文主要记录和分享学习到的知识,算不上原创 *参考文献见链接 目录 BL和BLF算法 BF算法 HR算法 PH算法

  4. PAT Basic 1048

    1048 数字加密 本题要求实现一种数字加密方法.首先固定一个加密用正整数 A,对任一正整数 B,将其每 1 位数字与 A 的对应位置上的数字进行以下运算:对奇数位,对应位的数字相加后对 13 取余— ...

  5. 牛腩新闻发布系统(五):VS网站发布及常见问题

    导读:在千万个回眸中,终于看见了牛腩的归途.好吧,牛腩该整合的都整合完毕了,到了发布的时候了.这时候,不得不再次感慨那句不知道感慨了多少次的感慨:为什么,我要遭遇这么多的坎坷?下面,结合自己的情况,说 ...

  6. iRule Event Order - HTTPSv7

    v

  7. iOS学习笔记18-CoreData

    一.CoreData介绍 CoreData是iOS5之后新出来的的一个框架, 是对SQLite进行一层封装升级后的一种数据持久化方式.它提供了对象<-->关系映射的功能,即能够将OC对象转 ...

  8. Unix(AIX,Linux)

    AIX全名为(Advanced Interactive Executive),它是IBM公司的UNIX操作系统. 虽然Linux和aix都是Unix兼容的操作系统,但他们在不同的领域存在各自的特点和差 ...

  9. 【二分+扫描线乱搞】B. Producing Snow

    注意二分写法... http://codeforces.com/problemset/problem/923/B #include<cstdio> #include<string.h ...

  10. jenkins使用流程

    jenkins使用流程 看下面那个连接的吧. http://www.cnblogs.com/zz0412/p/jenkins02.html 1.设置git库 2.点击add添加github用户名.密码 ...