Responsive Source as you adjust the screen size

4

I have a responsive website only that the same letter putting in%, Rem or EM does not adjust.

Then it is possible to make the font change for example a window with the length 1000px and font-size in 1.8em (18px)

asked by anonymous 13.06.2015 / 00:36

2 answers

4
@media only screen and (max-width: 1000px) {    
       body { font-size: 18px; }    
}
@media only screen and (max-width: 2000px) {    
       body { font-size: 36px; }
}

Just a detail, the measure for fonts has no direct proportional relation px , but rather with the zoom of each browser. Usually 1em equals 16px on most monitors.

    
13.06.2015 / 02:49
4

How about this code sample ? I found this blog post in Portuguese, but the summary of the opera is that 1vw is 1% of the width of the screen, 1vh is 1% of the height of the screen, and vmin and vmax are 1% of the smallest and largest dimension respectively. The first two units of measure work on any IE 9+.

(You can drag the grid partitions in JSFiddle to see the effect)

13.06.2015 / 00:47