gpt4 book ai didi

angularjs - 如何从 WordPress 对象设置字体样式

转载 作者:行者123 更新时间:2023-11-28 09:25:51 25 4
gpt4 key购买 nike

我从 WordPress 收到一个对象。

主要问题:当我在我的应用程序中访问 WordPress 的帖子时,它们都使用不同的字体,我应该如何设置这些字体的样式?

Here is a Plunkr如果您想尝试,请单击任何标题,这将带您到另一个 View ,在那里您会看到我在说什么。

这是我需要设置字体样式的 View

<script id="tab-post-detail.html" type="text/ng-template">

<div>
<h3>{{:: post.title}}</h3>
<p ng-bind-html=" post.content"></p>
</div>
</div>

</script>

here you may see the Object

最佳答案

将类(class)添加到您的 <div> :

<script id="tab-post-detail.html" type="text/ng-template">
<div class="tab-post-item">
<h3>{{:: post.title}}</h3>
<p ng-bind-html=" post.content"></p>
</div>
</div>

</script>

在你的 CSS 中:

.tab-post-item h3 {
font-family: Arial, sans-serif;
font-size: 18px;
font-weight: normal;
}
.tab-post-item p {
font-family: Verdana, sans-serif;
font-size: 14px;
}

您可能需要在每个 CSS 条目后缀 !important 以覆盖对象的内联样式。

关于angularjs - 如何从 WordPress 对象设置字体样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30157271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com