gpt4 book ai didi

php - 在声明中更改字体大小

转载 作者:太空宇宙 更新时间:2023-11-04 06:29:07 24 4
gpt4 key购买 nike

我正在使用 wordpress,我正在调用一个 h3 类。我想要一个较小的字体大小的条件,但我想使用相同的类,因为我使用的是谷歌字体并且它识别该类名称......有没有办法在类声明中更改字体大小?谢谢。

$title = get_the_title(get_the_ID());
if(strlen($title) > 51){
//Want smaller font size for this one!
the_title('<h3 class="entry-title">', '</h3><br/>' );
}else{
the_title('<h3 class="entry-title">', '</h3><br/>' );
}
}?>

最佳答案

虽然你想要同一个类然后在 h3tag 中使用样式属性它自己作为内联样式已经超过外部样式

$title = get_the_title(get_the_ID());
if(strlen($title) > 51){
//Want smaller font size for this one!
the_title('<h3 class="entry-title" style="font- size:smaller;">', '</h3><br/>' );
}else{
the_title('<h3 class="entry-title">', '</h3><br/>' );
}
}?>

关于php - 在声明中更改字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54835250/

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