css - Can I use JavaScript to get the dimensions that media queries use? -
for example here fiddle shows how change font when width drops below 200px.
@media (max-width: 200px) { .test { font-size:40px; } } if move html window right make smaller see point @ hits 200px b.c. font change.
if add dynamic div fiddle value output window cool test script media queries.
also, if there reference on web javascript interface media queries. hope there one. have not found yet.
here asking for. snippet below output dimensions media query uses.
http://jsfiddle.net/jbnt7nh1/8/
// code - updated fiddle here point start reading different widths in css.
Comments
Post a Comment