掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 4257|回复: 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 编辑 - q9 b' @3 o+ z5 r5 s8 L3 S

    . @" c9 i3 V* F; W, `170928:更换图例。
    ( g- J3 l6 t1 H------------------------------------------
    1 u1 S- r; P) B
    4 n- h- I; I7 E2 _% T------------------------------------------
    : I  F* r* n1 s9 H感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。
    ( {6 C1 [5 u6 t5 G9 zJumpToDicts 3.0 (英語構詞法詞典)& T2 Q1 _/ P4 N: o. j* C4 M
    JumpToDicts (phrase version add-ons)
    ; r! |5 @, t+ Z  j$ K我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable* J& M% {* m) B* ]" f
    8 m. l& X+ u) v( h; v* g
    词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。' q: s7 M9 V" V. ], n8 J
    根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    - V2 `8 c7 V& I1 S4 e* h% t+ Q, T, Q
    1. 在 GD 里找出词典编号。
    - @0 W! d5 o$ d1 Y, D9 D% ?* L$ C鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。
    . g/ t. Z" L9 y7 H2 m. r1 s
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.0
      ! ~+ ~/ n4 [1 [4 I1 E
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码

    9 q# T6 o+ B- x" w$ b* P7 A# n8 I# O: O
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。! @: f( |# B) r. `6 B3 H
    1. /* JumpToDicts | Start */. H4 P' y& n3 z0 `6 p3 y: E
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,7 \. ~& i/ K2 S$ N& M# T# |4 R/ `
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {" J2 `' R# I' u6 A, M" n- ~0 A
    4.   font-family: Lato, sans-serif !important;
      6 j' g' \4 P& P) e  A% {
    5.   font-size: .625rem !important;( L" z8 P3 E+ W
    6.   font-weight: normal !important;
      % A* q% M6 O3 t! \% a
    7.   font-style: italic;
      9 t4 v3 z1 F* w+ ]- p$ B
    8.   width: auto !important;
      : S  \3 [5 O) f" W$ d4 Y, r- H
    9.   padding: 0 !important;
        x, x6 D0 J4 N
    10.   color: gray !important;
      ) u& k8 R1 q$ ?  L1 U  b& _+ ?
    11.   border: none !important;! ]( B. y  j* B5 Y& p: j
    12.   border-radius: 0 !important;
      2 R4 e! Z$ e9 n; ?# i( b& l
    13.   background-color: transparent !important;
      4 C' z: F( \- i7 z; m: w+ i* H
    14.   box-shadow: none !important;
      , I5 F+ v7 s$ }8 K6 f! m
    15.   vertical-align: baseline !important;4 G' n; ?2 M; G* K' X
    16. }
      . k5 [# z- e1 I! }
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,1 W& r) W% c/ }& G
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {6 k3 y6 k: e/ M
    19.   font-family: "Segoe UI Symbol";1 V8 i) @( i; w2 d7 F( v7 D! P
    20.   font-size: .5rem;5 c3 x6 Z# p$ N& A) M3 W
    21.   font-style: normal;
      1 u+ J# w7 q5 Q
    22.   line-height: 0;
      : R% Z/ Z) c. a4 p
    23.   position: relative;
      ! |  k" {' v. v# ?, P
    24.   bottom: .0425rem;4 a  C! U7 b& D/ E4 M  p, D
    25.   margin-right: .23rem;
      ) L0 L: y* N# N9 P1 Z2 T0 w' \' b
    26.   content: "\279C";
      8 q5 U  k, d7 m" ^6 F) X
    27.   vertical-align: baseline;+ b. T/ p* W6 g/ b6 D- h
    28.   color: green;* ^; i8 v4 m* V) E# N
    29. }2 x9 k" W% ]: y" S
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }
      8 m5 ]. z& Y# T0 `
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }( R, t$ n% E7 L/ T- D% Y
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }' b& C+ d5 x% P0 _4 b7 b
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }0 x. [/ q, E: h/ s& {( p) a& P" f$ V4 J
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,' Q% R, e- a# Z: l$ B$ t" C
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }6 c1 o) s  T* X6 i, a" i+ x$ P
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,
      8 J4 F1 b2 u; E% K! v
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }! N# q/ G/ ]; K" [
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,
      . F# n3 c& ^3 m7 X4 x0 A6 u
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {- |" f+ U& M6 E" w
    40.   font-size: .875rem !important;/ W: J: y2 [% @" ?
    41.   font-weight: bold !important;
      + o2 Z9 [  Y; [9 i$ w
    42.   font-style: normal !important;
      1 U' u( o1 f2 W( a
    43.   margin: auto .23rem !important;
      ! E7 E( F; q* ]4 Z. W
    44.   text-decoration: none !important;
      / m, l$ _1 R/ S
    45.   color: black !important;
      2 J. u$ |- ?. b! |
    46.   border-bottom: .08rem solid transparent !important;
      1 y* _) c4 u# U( C8 ^2 T1 {" ~6 H; z
    47.   outline: none !important;5 B. I6 s% e* w1 g: e( g) x, [
    48. }
      ( ~) n1 b7 u0 _% y
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,* A" u: w, r" l: k# P. D+ s8 ?8 S1 H
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,
      % r2 @9 s3 Q+ v0 u0 ^3 [
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,% Q) O- d  \2 C- a
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      " P; `, v" z3 j! W
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,
      6 [2 Q, B5 a; r
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      / D7 p0 e. J" V1 z- J5 |! o
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,# a! i- H& _% r' n- k
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {
      4 P7 F. C' O2 R: ^2 U0 E( l( t: @
    57.   color: black !important;
      1 {& r7 M  m! Q; ^) J4 C
    58.   border-bottom-color: black !important;: W" M: m' `7 ~6 V* e
    59.   background-color: yellow !important;
      : Y8 I; w) T4 {4 v+ f' i; t
    60. }$ k  Q1 \/ b6 I) q( m- Y( a, S" Z; w
    61. /* JumpToDicts | End */
    复制代码

    . r$ ]; g4 y2 A% M' k- ^3 K  e+ W------------------------------------------; \& y0 C9 ?! d) x. W" ]# I4 ]/ ]
    修改 dsl 词典的展开按钮3 v+ l7 g0 H, ]/ }" C4 P# B' h

    2 B7 F4 p5 {4 ~( I- ]1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。1 j* D; J* ^- ^( P& }! f, M
    放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    7 u' \* g3 Z/ X# [9 X. U6 V& |! G) t& O( B& s) K0 N
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    9 g8 `/ R4 y1 q8 j调整各种 前后左右、高矮胖瘦。: p/ i; N$ x6 A; X3 N" ^
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }+ c' l" G0 G$ ^) c" l; z) N
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }
      $ G% T1 D0 p! d/ A
    3. .dsl_headwords img[src$="expand_opt.png"],7 r6 }- f) f4 J% A
    4. .dsl_headwords img[src$="collapse_opt.png"] {7 ~& \/ ^  q5 Z3 F0 a$ K6 o
    5.   line-height: 0 !important;; i$ ]" F2 s$ h. n" O' l
    6.   position: relative;% l/ w/ T' Y# E. l; _" n( m
    7.   bottom: .125rem;1 j$ w: Q" N3 y4 E. E
    8.   left: .475rem;: g1 ]5 A+ V7 f" y& q
    9.   width: .75rem;
      2 e* l/ j9 Z( m2 B$ `0 h- x" |
    10.   height: .75rem;
      & B* U5 k5 C, _. A
    11. }
    复制代码

    % x- d" A7 `8 G------------------------------------------
    ) m$ W6 H5 k6 j9 x. ~1 x. w
    3 v. D1 S+ E& X0 s搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    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:291 B/ s0 L8 w  o+ }8 D- h
    @deeke 好方法!!!!!
    " M5 T9 v# c7 P+ x& S; n" H2 t
    我比较晚才开始用 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文件,怎么实现?5 @, I9 j/ _6 r+ q2 {
    两个词典放在一个文件夹下。手机深蓝词典。3 ?& u1 t) E8 {& W, z' ?- I7 p: b) S
    谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

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

    GMT+8, 2026-9-1 23:55 , Processed in 0.019960 second(s), 24 queries .

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

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