直接这里贴代码。根据需要追加到C:\Users.…\AppData\Roaming\GoldenDict\article-style.css尾部
1、同词典不同词条分割优化
/*同词典不同词条分割*/
div.mdict {
margin-top:6px;
padding-top: 6px;
}
div.mdict {
border-top: 2px solid transparent;
border-image: radial-gradient(circle,transparent,rgba(131, 144, 98, 0.25)) 1 !important;
}
.gdarticlebody {counter-reset:entry;}
div.mdict::before{counter-increment:entry;content:"Entry " counter(entry);font-variant: small-caps;color:rgba(131, 144, 98, 0.4);background:rgb(228, 230, 218);padding-left: 12px;padding-right: 12px;
font-size: 12px;display: block;float:right;border-radius:4px;line-height:12px;}
div.mdict::before{position:relative;right: 49%;top: -12px;}
div.mdict:first-child{margin-top:0;}
div.mdict:only-child{border-top:none;border-image:none;}
div.mdict:only-child::before{content:none;}
.gdarticle{padding-bottom: 12px;}
2、每本词典文章页Neumorphism风格
div.gdarticlebody > iframe {border-radius:10px;border:0px dotted grey;}
.gdarticle
{
margin-bottom: 10px;
transition: 0.1s background-color;
background: linear-gradient(145deg, #edededee, #f0f0f0);
border-radius: 20px;
box-shadow: 20px 20px 60px #bebebe,
-5px -5px 30px #ffffff;
}
.gdactivearticle
{
background:rgba(250,240,230,0.7);
box-shadow: 2px 2px 5px #ADD8E6;
}
.gdinactivearticle
{
background: linear-gradient(145deg, #FFFFF3, #f0f0f0);
}
body
{
padding-left: 1%;
padding-right: 2%;
}
3、鼠标交互
.control span {
border-radius:0.2em;
opacity:1;
filter: alpha(opacity=0.9);
transition: 3ms linear;
}
.control span:hover {
opacity:0.9;
}
span.active{
font-size:120%;
padding:0.1em;
}
a {
color:#9394e7;
transition: color 0.3s ease;
text-decoration: none;
}
a:hover {
color: #ffbe7a ;
text-shadow: 0 0 2px #99999980;
background:rgba(125, 245, 255, 0.03);
}
4、在线维基百科显示优化
.noprint, .editsection, .mw-editsection, .mwiki table.navbox,
#donate, #coordinates {
display: none;
}
.metadata{
display: none;
}
.mwiki #toc{width:20%;min-width: 100px;max-width: 200px;float:left;margin-right:0.8em;}
.mwiki .infobox {width:20%;min-width: 100px;float:right;margin-left:0.8em;}
5、图片防溢出
img{object-fit: contain;max-width: 100%;text-align: center;}
6、文字防溢出边框
/*解决文章溢出问题*/
div.gdarticle > div.mdict{
display: block;
float:left;
}
7、宽屏自适应两栏输出
/*宽屏分2栏显示*/
@media (min-width:100em) {
.gdarticlebody > div, div.gdarticle > div.mdict{
width: 48%;
display: block;
flex-direction: column;
flex-wrap: wrap;
justify-content: space-around;
align-items: flex-start;
align-self: left;
align-content: start;
margin-bottom:1em;
margin-top:0;
margin-left:0.76%;
margin-right:0.76%;
box-shadow: 0 1px 3px lightgray;
border-radius: 3px;
overflow: hidden;
overflow-x: hidden;
padding: 5px;
}
.gdarticlebody > div::before, div.gdarticle > div.mdict::before{
top: -9px;z-index:-1;
}
.gdarticlebody > div:nth-child(odd), div.gdarticle > div.mdict:nth-child(odd) {
float:left;
}
.gdarticlebody > div:nth-child(even), div.gdarticle > div.mdict:nth-child(even) {
float:right;
}
.gdarticle:not(:has(>.mdict)) > .gdarticlebody > .mdict:only-of-type {
width: 99%;
box-shadow:none;
}
}
/*会误伤维基百科,改回来*/
.gdarticlebody > .mwiki {
width: 99%;
box-shadow:none;
}
.gdarticlebody > div::before, div.gdarticle > div.mdict::before{ top: -9px;z-index:-1;
这行代码是对应调整词条分割的绿色"Entry"框框的。不用那个可以去掉