【问题标题】:code for changing "Mouse Highlight" color更改“鼠标高亮”颜色的代码
【发布时间】:2013-10-31 07:27:33
【问题描述】:

我用artisteer制作joomla模板,我用这个代码:

.newsdate {
background: #f0f0f0;
color: #737373;
padding: 10px;
width: 40px;
height: 40px;
float: left;
margin-right: 10px;
margin-bottom: 25px;
text-align:center;
}
.art-blockheader .t, .art-vmenublockheader .t {white-space: nowrap;}
#art-licence-links 
{ 
display:none; 
} 
::selection
{
color:#FF4300;
}
::-moz-selection
{
color:#FF4300;
}

我的高亮颜色会发生变化,例如 this

但我希望它像this一样改变

【问题讨论】:

  • 使用background-color?
  • 如何让选择区域的文字变白?
  • 好吧,在你的::selection 伪选择器中使用color: white...
  • tanx,但是怎么做呢?我是菜鸟,尝试了一些组合但没有运气。
  • 你去。您只需将 color 添加到您的 ::selection 正文中。 jsBin

标签: web colors highlight


【解决方案1】:

在您的 ::selection::-moz-selection 块中添加 backgound-color 属性并指定所选背景的颜色。

【讨论】:

  • 我这样做了:.newsdate { background: #f0f0f0; color: #737373; padding: 10px; width: 40px; height: 40px; float: left; margin-right: 10px; margin-bottom: 25px; text-align:center; } .art-blockheader .t, .art-vmenublockheader .t {white-space: nowrap;} #art-licence-links { display:none; } ::selection { background-color:#FF4300; } ::-moz-selection { background-color:#FF4300; } 这发生了:link 好多了,但是我怎样才能让文本在选择区域变成白色而不是黑色?
猜你喜欢
  • 1970-01-01
  • 2010-11-07
  • 2013-07-16
  • 1970-01-01
  • 2011-09-06
  • 1970-01-01
  • 1970-01-01
  • 2021-08-21
  • 1970-01-01
相关资源
最近更新 更多