经过大量浏览后,我还没有找到解决方案。
我正在尝试更改this really light blue-ish border color
TextFiedl
(当它被选中时)。
.text-field {
-fx-faint-focus-color: red;
}
但我得到了这个结果:
一种非常强烈的红色调(与柔和边缘完全相反),看起来也比原来的更厚。
那么,我怎样才能改变只是的颜色,这样我就可以得到一个非常浅的蓝色而不是浅蓝色,同时保持厚度/整体感觉原始发光?
答案 0 :(得分:5)
您是否尝试过降低alpha:
.text-field:focused{
-fx-faint-focus-color: transparent;
-fx-focus-color:rgba(255,0,0,0.2); /* here rgba (corrected) */
}
答案 1 :(得分:4)
默认-fx-faint-focus-color
的不透明度为0x22
/ 0xFF
。您应该这样做,并将-fx-focus-color
设置为red
:
.text-field {
-fx-focus-color: red;
-fx-faint-focus-color: #ff000022;
}
modena.css
的默认值:
-fx-focus-color: #039ED3;
-fx-faint-focus-color: #039ED322;
答案 2 :(得分:-1)
看看下面的代码:
# mruby -v -e 'begin; begin puts 1; next end; puts 2 end'
mruby 1.2.0 (2015-11-17)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 NODE_BEGIN:
00001 NODE_BEGIN:
00001 NODE_CALL:
00001 NODE_SELF
00001 method='puts' (383)
00001 args:
00001 NODE_INT 1 base 10
00001 NODE_NEXT:
00001 NODE_CALL:
00001 NODE_SELF
00001 method='puts' (383)
00001 args:
00001 NODE_INT 2 base 10
irep 0x7fe0e3c1b630 nregs=4 nlocals=1 pools=1 syms=1 reps=0
file: -e
1 000 OP_LOADSELF R1
1 001 OP_LOADI R2 1
1 002 OP_SEND R1 :puts 1
1 003 OP_ERR "unexpected next"
1 004 OP_LOADSELF R1
1 005 OP_LOADI R2 2
1 006 OP_SEND R1 :puts 1
1 007 OP_STOP
1
trace:
[0] -e:1
LocalJumpError: unexpected next
# irb -v
mruby 1.2.0 (2015-11-17)
mirb - Embeddable Interactive Ruby Shell
> p RUBY_VERSION
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 NODE_CALL:
00001 NODE_SELF
00001 method='p' (384)
00001 args:
00001 NODE_CONST RUBY_VERSION
irep 0x7fceeac05220 nregs=4 nlocals=1 pools=0 syms=2 reps=0
file: (mirb)
1 000 OP_LOADSELF R1
1 001 OP_GETCONST R2 :RUBY_VERSION
1 002 OP_SEND R1 :p 1
1 003 OP_STOP
"1.9"
=> "1.9"
> p RUBY_ENGINE
00002 NODE_SCOPE:
00002 NODE_BEGIN:
00002 NODE_CALL:
00002 NODE_SELF
00002 method='p' (384)
00002 args:
00002 NODE_CONST RUBY_ENGINE
irep 0x7fceeae05cf0 nregs=4 nlocals=1 pools=0 syms=2 reps=0
file: (mirb)
2 000 OP_LOADSELF R1
2 001 OP_GETCONST R2 :RUBY_ENGINE
2 002 OP_SEND R1 :p 1
2 003 OP_STOP
"mruby"
=> "mruby"
>
00004 NODE_SCOPE:
00004 NODE_BEGIN:
irep 0x7fceeac06a50 nregs=2 nlocals=1 pools=0 syms=0 reps=0
file: (mirb)
4 000 OP_LOADNIL R1
4 001 OP_STOP
=> nil
> begin
00005 NODE_NIL
* begin
00007 NODE_NIL
* puts 1
00009 NODE_NIL
* next
00011 NODE_NIL
* end
00013 NODE_NIL
* puts 2
00015 NODE_NIL
* end
00012 NODE_SCOPE:
00012 NODE_BEGIN:
00012 NODE_BEGIN:
00012 NODE_BEGIN:
00012 NODE_CALL:
00012 NODE_SELF
00012 method='puts' (383)
00012 args:
00012 NODE_INT 1 base 10
00013 NODE_NEXT:
00015 NODE_CALL:
00015 NODE_SELF
00015 method='puts' (383)
00015 args:
00015 NODE_INT 2 base 10
irep 0x7fceeae01130 nregs=4 nlocals=1 pools=1 syms=1 reps=0
file: (mirb)
12 000 OP_LOADSELF R1
12 001 OP_LOADI R2 1
12 002 OP_SEND R1 :puts 1
13 003 OP_ERR "unexpected next"
15 004 OP_LOADSELF R1
15 005 OP_LOADI R2 2
15 006 OP_SEND R1 :puts 1
15 007 OP_STOP
1
LocalJumpError: unexpected next
>
00012 NODE_SCOPE:
00012 NODE_BEGIN:
irep 0x7fceeae078f0 nregs=2 nlocals=1 pools=0 syms=0 reps=0
file: (mirb)
12 000 OP_LOADNIL R1
12 001 OP_STOP
=> nil
> exit