Using rem units in media queries and as width
问题 When using rem units in Google Chrome (or firefox), the result is unexpected. I'v set up a page with the root font-size set to 10px to make it easier the translate a pixel based design to html/css. This is my css. My expectation would be a page with one 500px wide box and if the screen is wider than 500px the background should turn red. html { font-size: 10px; } @media screen and (min-width: 50rem){ body{ background-color: red; } } .test{ width: 50rem; background: black; height:100px; } But,