我正在尝试将以下样式更改应用于 reddit 小部件:
1) 将字体更改为 Oxygen Mono(CSS 中的 !important 覆盖不适用于字体,尽管它适用于链接颜色)
2) 修剪小部件的顶部以完全消除蓝条
3) 阻止 widget_arrows.gif 在 widget 中显示。
有什么想法吗?
@import url(http://fonts.googleapis.com/css?family=Oxygen+Mono);
html {
font-family:'Oxygen Mono', Tahoma, Arial, sans-serif;
}
#reddit {
width:900px;
margin:auto;
font:'Oxygen Mono' !important;
}
#reddit a:link, #reddit a:visited, #reddit a:hover, #reddit a:active {
color:gray !important;
}
最佳答案
当然你可以覆盖字体,你只需要指定正确的格式——如果你只改变字体系列,使用font-family
。调试工具中的简单查看也将其显示为“由于属性值无效而忽略了规则”。
至于剩下的,用元素检查器把它们挑出来修复即可:
/* Style the anchors specifically for CSS specificity */
#reddit a {
font-family:'Oxygen Mono' !important;
}
.reddit-header, .reddit-voting-arrows {
display:none !important;
}
关于html - 设计 reddit 小部件的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21010563/