Questions tagged «background-color»

“ background-color”是一个CSS属性,用于定义元素的背景色。也用“ css”标记这些问题。



7
如何在Mac上的Safari中删除选择元素的光泽?
在Mac和iOS设备上,在Safari中,<select>具有背景颜色的元素会在其自身上方产生光泽。在其他操作系统中似乎不会发生这种情况。 例如,我有一个具有以下样式属性的select元素: select { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; padding: 3px 6px; margin: 10px 0 7px; width: 250px; background-color: #BD2786; color: white; letter-spacing: -.04em; font-weight: bold; border: 0; } 我的元素具有所需的背景色,但光泽仍然存在。有谁知道如何使其成为纯色?

9
如何更改Android 5.0的DatePicker对话框颜色
是否可以更改android 5.0的datepicker(以及timepicker)配色方案? 我尝试设置重点色,但这不起作用(带和不带android:): <!-- colorPrimary is used for the default action bar background --> <item name="colorPrimary">@color/purple</item> <!-- colorPrimaryDark is used for the status bar --> <item name="colorPrimaryDark">@color/purple_tint</item> <!-- colorAccent is used as the default value for colorControlActivated which is used to tint widgets --> <item name="colorAccent">@color/purple_tint</item> 从原始: 对于这样的事情:



14
悬停时是否可以仅更改rgba背景颜色的Alpha?
我有一套 <a>标签,标签的rgba背景颜色不同,但是alpha相同。是否可以编写单个CSS样式来仅更改rgba属性的不透明度? 代码的简单示例: <a href="#"><img src="" /><div class="brown">Link 1</div></a> <a href="#"><img src="" /><div class="green">Link 2</div></a> 和样式 a {display: block; position: relative} .brown {position: absolute; bottom: 0; background-color: rgba(118,76,41,.8);} .green {position: absolute; bottom: 0; background-color: rgba(51,91,11,.8);} 我想做的是编写一种样式,当将<a>鼠标悬停在其上时会更改不透明度,同时保持颜色不变。 就像是 a:hover .green, a:hover .brown {background-color: rgba(inherit,inherit,inherit,1);}


4
堆叠的半透明盒子的颜色取决于订单?
为什么两个堆叠的半透明盒子的最终颜色取决于顺序? 如何使两种情况下的颜色相同? .a { background-color: rgba(255, 0, 0, 0.5) } .b { background-color: rgba(0, 0, 255, 0.5) } <span class="a"><span class="b"> Color 1</span></span> <span class="b"><span class="a">Different Color 2</span></span> 运行代码段隐藏结果展开摘要


9
给定背景色的良好文本前景色
我正在绘制一个颜色选择按钮,并且正在寻找一个简单的公式来为RGB中的给定背景色获得良好的文本颜色(前景)。 一个简单的尝试就是只取补色,但这会为纯蓝色或纯红色之类的颜色产生奇怪的外观。 有什么众所周知的东西吗? 如果很重要,我正在使用QT。


6
什么是默认布局背景
我有一个WebView可以加载带有文本的HTML文件。问题是html内部和外部的颜色不相同。这是屏幕截图: HTML文件是: <html dir="rtl"> <head> <title>About</title> <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> <body bgcolor="#FFFFFF"> <p>This is a Testpp</p> <p>See the problem.</p> <p>last test:</p> </body> </html> (如果我删除了:bgcolor="#FFFFFF"颜色保持不变)谢谢!
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.