掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 4065|回复: 6

[经验交流] [2] 通过 article-style.css 调整跳转词典 JumpToDicts

[复制链接]
  • TA的每日心情
    慵懒
    2025-1-28 16:22
  • 签到天数: 216 天

    [LV.7]常住居民III

    发表于 2017-9-21 05:05:21 | 显示全部楼层 |阅读模式
    本帖最后由 deeke 于 2017-10-10 23:38 编辑
    . x/ c! @) j, X# Q0 [: ~( c4 \0 n: s" E
      Z$ ~- R( {" r" B! U  v170928:更换图例。/ |' \9 T5 w) y& y2 [) g
    ------------------------------------------
    & @( m  i% Y5 J. B: o4 q
    3 x) N! w4 N4 |* [5 b------------------------------------------
    ) N, ]  C& A1 a6 w感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。7 V: x& O# K7 d# O! x: C
    JumpToDicts 3.0 (英語構詞法詞典)0 L' o+ n& A- t' A
    JumpToDicts (phrase version add-ons)
    - ]6 |9 x' k( R4 ?( m  n& S8 d我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable1 f$ q" f) w& w5 z5 E2 ~
      j9 `. q+ ?( D4 {: ~, F
    词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。* e; G$ i: Y+ j( k. I' T, ]& ^0 N
    根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    3 P' z2 c" G; O- A' u0 J, B  n& U8 O& B4 S6 c, }) p
    1. 在 GD 里找出词典编号。4 v/ N; v1 y/ p. S
    鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。
      l3 c3 |2 U4 ?' d! t$ Y
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.04 ~; l+ d: K" |' u" b# k
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码

    & J7 i  c, S1 e2 K' i; a4 K% V" O2 x
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。
    ( A( T* [7 _. _: x) ]8 a2 |7 U( j
    1. /* JumpToDicts | Start */& L! k! c: r3 C) ?9 _1 }* e
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,4 c% h9 k7 Y( P
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {  V! s2 s8 R4 o& N4 g3 K: n' N
    4.   font-family: Lato, sans-serif !important;
      + Z5 f: f' b3 [1 h. k5 i7 ?; K
    5.   font-size: .625rem !important;7 t( a/ q( o/ z( i4 q
    6.   font-weight: normal !important;9 f' W+ W8 {7 r
    7.   font-style: italic;! z) w5 \. V8 T9 U. l8 J
    8.   width: auto !important;+ o  d7 M: W8 c8 K+ M& h
    9.   padding: 0 !important;2 B( S- X6 M% v  _0 @
    10.   color: gray !important;
      3 R7 [3 D: x9 z, e, W
    11.   border: none !important;
      ' v8 ~; ?: F0 n: p# l/ f( D
    12.   border-radius: 0 !important;
      . t4 a$ d' M2 S( E6 r- a
    13.   background-color: transparent !important;
      8 o. R% _" i- B" k% z0 H' S3 R9 m6 V
    14.   box-shadow: none !important;
        l4 q" O6 P! l! s
    15.   vertical-align: baseline !important;+ f. U1 U" ^8 [# r6 ?# N
    16. }
      2 h8 }. }9 d" n" }3 ], S( @, |
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,. Y3 ]5 W' `6 O$ {( x
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {/ O( y4 ^& X8 H8 @; G2 }
    19.   font-family: "Segoe UI Symbol";
      1 ]2 K( R( t5 h, U1 }1 R( f
    20.   font-size: .5rem;7 ]2 l* N+ K- _& v3 W9 a
    21.   font-style: normal;
      ( Q/ O( u& ~6 ?  q/ P) Z; d, L
    22.   line-height: 0;
      / _5 y& M. Y" k' u
    23.   position: relative;
      3 r5 C! W3 Q6 e) r
    24.   bottom: .0425rem;$ f# k" _2 Q- p3 O' H7 Q) p6 B7 \
    25.   margin-right: .23rem;
      * n8 P0 K; E& o& k7 U
    26.   content: "\279C";
      2 B4 o' X6 x1 Q! K, g3 p0 V' M% Y
    27.   vertical-align: baseline;' ]' y( {; H9 A' l% X
    28.   color: green;5 Y/ I* l. [  B0 T
    29. }
        h' i) a2 p: a3 Z
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }' a& V/ u3 p$ a  U: M
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }
      9 C, Z2 t, v: W2 N2 `  |) X
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }
      # V: R# O3 Y" E6 P
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }% D0 o6 q- T; ?1 D* `0 y' o. k
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,- P2 ~! {) v. d
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }; g! S; [  R2 h' _3 B9 u
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,/ R) m4 q* ?! k; D
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }
      + \. e, L7 o4 K, J
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,+ |$ O/ u4 `5 f% V
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {  {( J: }: v6 S7 \' J& s
    40.   font-size: .875rem !important;
      ) B3 f' N1 ~9 R/ L- G
    41.   font-weight: bold !important;) z( \8 G  l3 j8 j
    42.   font-style: normal !important;" \$ h5 y  ^3 R1 a1 l
    43.   margin: auto .23rem !important;
      + Y$ L' E0 S: `5 S9 p
    44.   text-decoration: none !important;" v" @9 Y9 L; y( c, @3 l
    45.   color: black !important;
      5 p  \1 Y7 y. [# ~+ Z6 ^3 q! |
    46.   border-bottom: .08rem solid transparent !important;) h& r  x, N  D. s' T0 P$ v
    47.   outline: none !important;
      $ ?/ ~& q- j! A9 r! |7 s) G4 ~/ l7 {
    48. }
      , C$ J' h% z  t5 l. D% |
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,
      . z4 F6 G- o4 m: d
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,( @2 e, O7 g( \9 Y
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,
      " [' m# X- e. I7 F* W( [8 g6 b7 v5 d4 J! m
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }! G2 r8 N. B- @" E) I; G
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,
      2 P' ?* a' n6 k& q% U8 I
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      9 Y9 o8 b! m! ]
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,+ i" ^1 X# G+ c  K
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {9 M, c5 \/ r8 c! ?7 r& Y" D% @
    57.   color: black !important;
      9 M0 h: m6 }/ D
    58.   border-bottom-color: black !important;
      ' R& L5 F- z! e- ]6 V8 E+ ^5 n$ E
    59.   background-color: yellow !important;
      1 S. ~0 Y) D- n1 e& ^, J' U
    60. }. b4 y: k: x" I, W. d8 k5 ?
    61. /* JumpToDicts | End */
    复制代码

      w% o4 _; E! Q! Y& r------------------------------------------
    / p; G6 P- l4 a修改 dsl 词典的展开按钮+ R2 b/ n* V( b2 g- i& ~0 Y
    " M# j" d6 d" w
    1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    9 [& M1 H; _4 D/ M3 ~$ s/ h5 a放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。  t6 v) Y, M+ T; V# p

    ! q9 y# \+ F% T2 [6 j2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    7 X) E4 Z9 z; r: k/ }- m调整各种 前后左右、高矮胖瘦。
    : A8 f* Z) M# \; {/ r  m
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }& |# w' Q% r2 Z! W1 F( V+ c
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }+ @$ \- G1 t5 G
    3. .dsl_headwords img[src$="expand_opt.png"],( S& G; l5 R% [2 D/ x
    4. .dsl_headwords img[src$="collapse_opt.png"] {7 n2 \& ^1 m+ ]! i3 X" N8 o
    5.   line-height: 0 !important;+ W3 c- K$ g9 ]- n, ]
    6.   position: relative;
      4 B1 c0 C" M! W+ m: A
    7.   bottom: .125rem;
      - b% d- y: f9 h* t, M. `3 v& r/ C
    8.   left: .475rem;6 S' U& X  d# V) P
    9.   width: .75rem;
      8 r. E1 {8 ]$ l7 ]* E
    10.   height: .75rem;; C: S( u* K( M
    11. }
    复制代码

    4 [" n$ F: S3 x8 J7 U0 d------------------------------------------" ?# I" Y0 Z% F* @2 p" B/ g
    + m7 W: @* X1 m/ H, r9 a
    搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    3

    查看全部评分

    本帖被以下淘专辑推荐:

    • · 工具|主题: 61, 订阅: 27
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 08:27:21 | 显示全部楼层
    GoldenDict_Qt5_x64_portable 这种词典是不是只能放在portable目录??

    点评

    不是,比如我词典文件放在 c:\Dicts\ ,把这个文件夹的快捷方式 Dicts.lnk 放在 ...\GoldenDict\content\ 中就可以了。注意不是 mdx 的快捷方式,是文件夹的。  发表于 2017-9-21 10:20
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 10:29:45 | 显示全部楼层
    @deeke 好方法!!!!!
  • TA的每日心情
    慵懒
    2025-1-28 16:22
  • 签到天数: 216 天

    [LV.7]常住居民III

     楼主| 发表于 2017-9-21 10:37:42 | 显示全部楼层
    HMPT 发表于 2017-9-21 10:29
    9 o4 W! q6 {5 U! m: t% o@deeke 好方法!!!!!
    ( C6 }* p7 M! G! r7 M0 W* J
    我比较晚才开始用 GD ,都是从置顶的经验贴学来的。

    该用户从未签到

    发表于 2019-1-9 16:27:04 | 显示全部楼层
    谢谢,才知道把词典目录的快捷方式放在content那里也可以。
  • TA的每日心情
    开心
    2019-5-28 07:39
  • 签到天数: 339 天

    [LV.8]以坛为家I

    发表于 2019-4-12 16:25:44 | 显示全部楼层
    请问,直接修改mdx文件,怎么实现?
    2 g9 @* F& _2 F( L* M# S: f* q7 r两个词典放在一个文件夹下。手机深蓝词典。
    / p/ d) H- _5 T2 Y* U! a8 c谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

    小黑屋|手机版|Archiver|PDAWIKI |网站地图

    GMT+8, 2026-7-2 16:11 , Processed in 0.020784 second(s), 24 queries .

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表