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.

https://www.google.com/#q=quirksmode+screen+width


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -