html-字体大小CSS问题

前端之家收集整理的这篇文章主要介绍了html-字体大小CSS问题 前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我试图在我的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:粗体!但这是一个font-weight属性,而不是font-size属性.这就是它不起作用的原因.
如果要更改字体的大小,则应使用某种单位,例如px,em …,例如:

font-size: 40px;

如果要使文本加粗,也可以使用:

font-weight: bold; 

猜你在找的HTML相关文章