css - CSS 选择具有特定字体的所有文本
问题描述
有没有办法选择具有某种字体的所有元素?我试过了:
[font-family*=Menlo]{
font-family: OpenDyslexicMono;
}
解决方案
I think this global selector will help to do that
`* { /* this solution best and along the side worst also help you select all the elements */
font-family: OpenDyslexicMono;
}
`
html, body { /* this allows the children to inherit this style */
font-family: OpenDyslexicMono;
}
body * { /* assigns this style to every tag inside of your body tag */
font-family: OpenDyslexicMono;
}
p, span, a, etc { /* you decided what tags would most likely contain text to apply that style */
font-family: OpenDyslexicMono;
}
这是我第一次回答。让我知道这是否对您有帮助。
如果我犯了任何错误,请告诉我
谢谢
推荐阅读
- inline - 我可以将 pragma `Inline` 放在正文中而不是规范中吗?
- java - 用另一个 Spark Java 替换一列值
- mql4 - MQL4 的 _Point 的 PineScript 等价物是什么?
- php - 如何用 ChromDriver 和 yii2 解决“元素不可交互”?
- c - 为什么我的开关盒不适用于乘法或加法
- vue.js - 如何应用选择器选项仅在 Element UI 日期选择器中启动日历
- material-ui - Material UI IconButton onClick 不允许处理事件
- javascript - 无法选择元素:找不到节点
- flutter - 从一个更改到另一个时,所有选项卡都会不断重建
- html - 如何让图像填充 div 内的剩余空间?