javascript - Different stylesheet for different device -
i have question: how automatically change website based on device type? know there like
@media screen , (max-width:720px){/*code mobile here*/} @media screen , (min-width:1280px) {/*code pc here*/}
but think can cause problems on big resolution mobile devices , low resolution desktop monitors. wonder there way of changing css file/selecting exact part of css code based on device type, smartphone, tablet or pc?
anything works help. if not clear, try explain better. if i'm wrong, correct me.
you can use these:
// large devices (desktops, less 1200px) @media (max-width: 1199px) { ... } // medium devices (tablets, less 992px) @media (max-width: 991px) { ... } // small devices (landscape phones, less 768px) @media (max-width: 767px) { ... } // small devices (portrait phones, less 576px) @media (max-width: 575px) { ... }
Comments
Post a Comment