twitter bootstrap - Can I reduce the html font size during responsive? -
i did whole website rem units used bootstrap 4 aplha version , going start doing responsive of website.
i have html {font-size: 16px} need know can reduce size of html in media queries? like:
/****responsive css***/ @media screen , (max-width: 1280px) { html{ font-size: 15px; } } @media screen , (max-width: 1199px) { html{ font-size: 14px; } } i need know there problem or can use this?
this way may overwrite rule in lower 1280px device width, because tha latter rule override it.
you better this:
@media screen , (min-width: 1000px) , (max-width: 1199px) { html{ font-size: 14px; } } @media screen , (min-width: 1200px) , (max-width: 1280px) { html{ font-size: 15px; } } also, better idea use % (percentage units) combined em unit, relative css units size, in responsive design, not no more dependent on device pixel ratio.
body{ font-size: 62.5%; } #element{ font-size: 1em; } you may read more best practices css units here
Comments
Post a Comment