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. Struts2之初体验

    Struts21.了解Struts2 请求调度框架Struts2是一个MVC框架Struts2类库:Struts2-core Struts2核心XWork-core xwork核心 Struts2的构 ...

  2. Hive 执行查询语句报错,由于内存空间不足导致

    org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Can ...

  3. js中取绝对值的2种方法!

    1.abs() var aaa=-20; var bbb=Math.abs(aaa); 2.加减法 var aaa=-20; var bbb=-aaa

  4. 13-数组的API方法遍历

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  5. 【Luogu】P1854花店橱窗布置(DP)

    照例良心题目链接 此题使用f[i][j]表示前i束花放进前j个花瓶的时候的最大值.转移方程如下 f[i][j]=max(f[i][j-1],f[i-1][j-1]+que[i][j]) 其中que[i ...

  6. 2016 ACM-ICPC China Finals #F Mr. Panda and Fantastic Beasts

    题目链接$\newcommand{\LCP}{\mathrm{LCP}}\newcommand{\suf}{\mathrm{suf}}$ 题意 给定 $n$ 个字符串 $s_1, s_2, \dots ...

  7. springmvc接口接收json类型参数设置

    Springmvc需要如下配置: 1.开启注解 <!-- 开启注解--> <mvc:annotation-driven /> 2.加入相关bean <bean class ...

  8. websql使用实例

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. angular中关于ng-repeat的性能问题

    首先,ng-repeat的渲染是改变则渲染的.而且是无法自动检测内容是否改变的. $scope作为一个对象,对象的特性就是两个对象是不相同的,因为我们比较的是两个对象的地址,即便两个对象的内容甚至排版 ...

  10. webstorm取消自动保存并标识修改的文件为星星标记

    a.取消自动保存是去掉一下两个勾选. b.标记星星要勾选下面的选项. c.最终效果.