Я изучаю React и столкнулся со следующей проблемой. Элементы img и p имеют стилизацию, но элемент h1 почему-то игнорируется. Это почему?
import "./Body.css"
img { // inside Body.css
height: 150px }
h1 {
font-size: 15px;
color: red
}
p {
font-size: 15px;
color: red
} // inside Body.css
function Body(){
const imgStyle = {
marginTop: 45
}
return (
<div style={{paddingTop: 100}} className="container">
<div style={{paddingTop: 20}} className="row">
<h1>Overview</h1>
</div>
<div className="row">
<div className="col-md">
<p>Coronavirus disease (COVID-19) is an infectious disease caused by a new virus.
The disease causes respiratory illness (like the flu) with symptoms such as a
cough, fever, and in more severe cases, difficulty breathing. You can protect
yourself by washing your hands frequently, avoiding touching your face, and
avoiding close contact (1 meter or 3 feet) with people who are unwell.</p>
</div>
<div className="col-md">
<img></img>
</div>
</div>