更改嵌入文本的颜色

时间:2021-03-11 23:59:28

标签: javascript web colors embedded-resource

我一直在尝试将此文本颜色设为白色而不是黑色,以便在我们的网站上更具可读性。不幸的是,我一直没有成功改变它。我不确定我错过了什么,哈哈,我确定它就在我面前。我确实通过一个网站来嵌入这个。

<div id="medium-widget">  
</div>
<script src="https://medium-widget.pixelpoint.io/widget.js">

</script>

<script>MediumWidget.Init({renderTo: '#medium-widget', params: {"resource":"https://medium.com/paradigm-fund/c%C3%B8smos-network-proposal-to-add-the-gravity-dex-onto-cosmos-hub-is-live-tendermint-invests-in-c68d8600e35b","postsPerLine":3,"limit":6,"picture":"big","fields":["description","publishAt"],"ratio":"original"}})

</script>

1 个答案:

答案 0 :(得分:0)

我相信你可以像这样检查元素并覆盖 CSS:

以红色为例:

.medium-widget-article__description{
  color: red !important;
}
<div id="medium-widget">  
</div>
<script src="https://medium-widget.pixelpoint.io/widget.js">

</script>

<script>MediumWidget.Init({renderTo: '#medium-widget', params: {"resource":"https://medium.com/paradigm-fund/c%C3%B8smos-network-proposal-to-add-the-gravity-dex-onto-cosmos-hub-is-live-tendermint-invests-in-c68d8600e35b","postsPerLine":3,"limit":6,"picture":"big","fields":["description","publishAt"],"ratio":"original"}})

</script>

引用自medium-widget.pixelpoint.io

<块引用>

自定义样式
此小部件不使用 iframe,它允许您 覆盖它使用的所有现有样式并使其看起来 随你喜欢。例如,您可以自定义样式 通过简单地定义 css 属性的文章标题 medium-widget-article__title 类。