Reasons why CSS font-size remains unchanged
P粉986028039
P粉986028039 2024-03-31 08:46:51
0
1
489

.navbar-brand{
  font-weight: bold;
  font-family: "Ubuntu";
  font-size: 2.5rem;
}
<a class="navbar-brand" href="">tindog</a>

This is how I tried to change the font size of a link through some class and I ran into something weird, both the font family and the font weight, everything changed, meaning that I defined the The class index.html is correct and in the css file I did it correctly! But the size didn't change, someone explained to me what could be the problem. Thanks! !

P粉986028039
P粉986028039

reply all(1)
P粉022140576

I tested your code and there is no problem. Try using pixels to change the font size.

.navbar-brand {
font-weight: bold;
font-family: "Ubuntu";
font-size: 40px;
}

Since 1rem = 16px.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template