Search code examples
htmlmobilemedia-queriesscreen-size

How to use media query with div as screen for mobile preview in desktop website?


I need to show a preview of the code responsive in a div that has the size of a mobile phone, how can I use media queries? or i can do it with jquery? Thanks a lot !


Solution

  • HTML

    <iframe src="link-to-the-site-you-want-to-demo.html"></iframe>
    

    CSS

    iframe{ /*your phone dimensions here*/
        height:640px;
        width:320px;
    }