gpt4 book ai didi

html - 字体大小 CSS 问题

转载 作者:可可西里 更新时间:2023-11-01 13:19:26 24 4
gpt4 key购买 nike

我正在尝试将字体大小更改添加到我的 CSS 中的特定 P 标签。

我创建了一个新类 .mainbg p { xxxx } 但这不起作用。奇怪的是,当我为那个 p 添加文本阴影时,同一个类起作用了。我不明白为什么它对此不起作用。

我已经添加了 CSS 类

.mainbg p {
font-size: bold!important;
}

这也什么也没做。

<section aria-label="home" class="mainbg" id="home">

<!-- intro -->
<div class="container">
<div class="row">
<div class="overlay-main v-align">
<div class="col-md-10 col-xs-11">

<h1 class="onStep" data-animation="animbouncefall" data-time="300">LOUIS WALLACE CONSTRUCTION</h1>
<div class="onStep" data-animation="fadeInUp" data-time="600" id="slidertext">
<h3 class="main-text">Oroville General Contractor</h3>
<h3 class="main-text">Over A Decade Of Experience</h3>
<h3 class="main-text">All Phases Of Construction</h3>
</div>
<p class="onStep" data-animation="animbouncefall" data-time="900" >No matter how large or small the project, we ensure that your project is completed with precision and professionalism. We take pride in our quality craftsmanship, our attention to detail, and our open line of communication with each and every customer. With each project, we understand that our role is about more than simply putting up walls — it’s about ensuring that your vision is turned into a reality.

我能在我的模板中找到的唯一 CSS 是动画 CSS:

.onStep{ opacity:0; }

当我搜索 onStep 的任何其他 CSS 时,我除了 javascript 什么都看不到。难倒了。

最佳答案

您尝试了 font-size: bold!important; 但那是 font-weight 属性,而不是 font-size 属性。这就是它不起作用的原因。如果你想改变字体的大小,你应该使用某种单位,px, em...比如:

font-size: 40px;

如果你想让文本更粗,你还可以使用:

font-weight: bold; 

关于html - 字体大小 CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54700243/

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