【发布时间】:2015-04-03 18:57:27
【问题描述】:
我无法让 Chrome (41) 和 Firefox (36) 将特定颜色应用于整个选择背景,尽管指定了橙色背景,但某些区域仍然是蓝色。
考虑以下示例:
::selection
{
background: rgba(255, 127, 0, 0.996);
color: white;
}
::-moz-selection
{
background: #F80;
color: white;
}
img::selection
{
background: rgba(255, 127, 0, 0.8);
color: white;
}
<p>The domestic cat is a small, usually furry, domesticated, and carnivorous mammal. They are often called a housecat when kept as an indoor pet, or simply a cat when there is no need to distinguish them from other felids and felines. Cats are often valued by humans for companionship.</p>
<img src="http://placekitten.com/g/75/300">
<img src="http://placekitten.com/g/300/300">
<img src="http://placekitten.com/g/150/300">
<p>A Melvin, Michigan woman was brutally attacked by a stray cat and shocking footage of the mauling has already gained a million views on YouTube.</p>
<p>The woman, who identified herself to reporters only as Maxx, endured the horrific attack November 30 but only recently realized it had been caught on her home surveillance camera.</p>
<p>The attack left her face swollen and infected and the cat named Buddy dead as officials were forced to test it for rabies.</p>
当按下 Ctrl+A 时,Chrome(和 Opera)将如下所示:
Firefox 将如下所示:
令人惊讶的是,Internet Explorer (11) 是正确的:
在上面的 Chrome 和 Firefox 示例中,有没有办法让整个选择变成橙色或白色/透明?
【问题讨论】:
标签: html css google-chrome firefox selection