Handle different font styles with css

0

A big greeting:

It happens that a text source has different variations, in this case I have chosen to choose the open sans, which has light, regular, bold, extrabold font, the fact is that I want to vary in the sources, that the first be bold, the second regular, the third light, but I only get one option and by placing font-family: 'Open Sans', sans-serif; there is no variation between the words, the whole text is the same.

Thanks

<style>
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
</style>

#t3{
font-family: 'Open Sans', sans-serif;
font-size: 20px;
}

#t4{
font-family: 'Open Sans', sans-serif;
font-size: 20px;
}


#t5{
  font-family: 'Open Sans', sans-serif;
  font-size: 20px;

}
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

<div id="titular"><div id="t3"> MODELANDO</div> <div id="t4">LAS IDEAS</div><div id="t5">CON CREATIVIDAD</div></div>
    
asked by linjai 10.07.2018 в 03:02
source

1 answer

1

What happens is that you have to add the variations of the sources in the HTML. According to what I read, it should look like this:

<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet">

Tell me if it worked for you, regards.

    
answered by 10.07.2018 в 04:31