我的CSS:
::selection, ::-moz-selection {
color: #f2f2f2;
background: #404040;
text-shadow: none;
}
它可在Chrome上运行,但在Firefox上仍具有默认的蓝色背景。
知道为什么吗?
答案 0 :(得分:2)
尝试单独执行以下操作:
查看此处:https://developer.mozilla.org/en-US/docs/Web/CSS/::selection
func convertDate12HourFormat(dateStr: String) -> String {
let formatter = DateFormatter()
formatter.dateFormat = "dd/MM/yyyy HH:mm"
formatter.timeZone = TimeZone(abbreviation: "GMT+0:00")
let dateFromStr = formatter.date(from: dateStr)
formatter.dateFormat = "dd/MM/yyyy hh:mm a"
let strFromDate = formatter.string(from: dateFromStr!)
return strFromDate
}
答案 1 :(得分:2)
尝试分离选择器:
import { storiesOf } from '@storybook/angular';
import { text, boolean } from '@storybook/addon-knobs';
import { KaButtonComponent } from '../app/modules/ka-basic-components/ka-button/ka-button.component';
storiesOf('Button', module).add('Primary', () => ({
component: KaButtonComponent,
props: {
text: text('text', 'Button text'),
disabled: boolean('disabled', true)
},
moduleMetadata: {}
}));
::-moz-selection {
color: #f2f2f2;
background: #404040;
text-shadow: none;
}
::selection {
color: #f2f2f2;
background: #404040;
text-shadow: none;
}