background和background-color的区别
在设置输入框变成一条线的样式时遇到一个小问题。
无论怎么设置 输入框的背景都没有变
而设置background: #aaa;背景就改变了。
后来发现原因
background 可以设置 背景颜色、背景图片、定位等
background-color 只能设置 背景颜色
设置时仅仅改变了背景色,但此时有一个默认的的background:repeat;
而设置background: #aaa;后,相当于同时设置了background:no-repeat;
既{background-color: #aaa;background:no-repeat;}=={background: #aaa;}
background和background-color的区别的更多相关文章
- 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 ...
- background和background-image一点小区别
如果使用background-image属性,则no-repeat不能使用,因为其对background-image不起作用. 可以使用background属性,再设置no-repeat.
- IOS Background 之 Background Fetch
http://www.ithao123.cn/content-1363653.html 定期更新数据的app,比如及时通信类,微博等app. 定期后台获取,等打开后获取的快一些. 30分钟后打开手,获 ...
- CSS3 & gradient & color & background
CSS3 & gradient & color & background css background https://developer.mozilla.org/en-US/ ...
- CSS背景属性Background详解
[转] 本文详解了CSS的背景属性Background,包括CSS3中新增的背景属性.如果你是个CSS初学者,还可以查看之前介绍的CSS浮动属性和CSS透明属性详解. CSS2 中有5个主要的背景(b ...
- background小结
CSS背景属性Background详解 本文详解了CSS的背景属性Background,包括CSS3中新增的背景属性.如果你是个CSS初学者,还可以查看之前介绍的CSS浮动属性和CSS透明属性详解. ...
- CSS3详解:background
CSS3对于background做了一些修改,最明显的一个就是采用设置多背景,不但添加了4个新属性,并且还对目前的属性进行了调整增强. 1.多个背景图片 在css3里面,你可以再一个标签元素里应用多个 ...
- css3之background
background background: (1)url(image1.png) right bottom, (2)url(image2.png) center, (3)url(image3.png ...
- css2和CSS3的background属性简写
1.css2:background:background-color || url("") || no-repeat || scroll || 0 0; css3: backg ...
随机推荐
- 17.纯 CSS 创作炫酷的同心矩形旋转动画
原文地址:https://segmentfault.com/a/1190000014807564 感想: 这个特效不难,但是这想法可能想不到,哈哈,怎么又废了. HTML代码: <div cla ...
- Android 开发第二步——建立文件
先以Hello World工程为样板 启动AVD 但在编程过程中遇到了非常棘手的问题 等待下一期完成
- tomcat及nginx相关,格式化输出,配置及日志解析
1.https://www.cnblogs.com/jingmoxukong/p/8258837.html?utm_source=gold_browser_extension Tomcat ...
- 在集群上运行Spark
Spark 可以在各种各样的集群管理器(Hadoop YARN.Apache Mesos,还有Spark 自带的独立集群管理器)上运行,所以Spark 应用既能够适应专用集群,又能用于共享的云计算环境 ...
- 机器学习进阶-边缘检测-Canny边缘检测 1.cv2.Canny(进行Canny边缘检测)
1. cv2.Canny(src, thresh1, thresh2) 进行canny边缘检测 参数说明: src表示输入的图片, thresh1表示最小阈值,thresh2表示最大阈值,用于进一步删 ...
- zookeeper windows7下集群搭建
模拟分布式环境!!! 搞了好几天,各种错误!!终于成功了. 环境: windows7 /centos/xsheel 安装了三个虚拟机... 1.下载zookeeper http://archi ...
- mui init 出现无法引入子页面问题
1. 检查项目中是否重复出现了 mui.init() 函数; mui.init({ subpages: [{ styles: { // top: "44px", top: &quo ...
- Dev的TextEdit控件IP地址的Mask设置
1. 添加TextEdit控件. 2. 选中TextEdit控件,查看控件属性. 3. 展开Properties属性项,找到Mask属性项. 4. 设置Mask属性项的EditMask属性值为:(25 ...
- How to Pronounce the Word OR
How to Pronounce the Word OR Share Tweet Share Tagged With: OR Reduction Study the OR reduction. Th ...
- RabbitMQ系列教程之三:发布/订阅(Publish/Subscribe)(转载)
RabbitMQ系列教程之三:发布/订阅(Publish/Subscribe) (本教程是使用Net客户端,也就是针对微软技术平台的) 在前一个教程中,我们创建了一个工作队列.工作队列背后的假设是每个 ...