Answer the question
In order to leave comments, you need to log in
How to make scale for a certain screen size?
Hello. Please take a look at my styles:
<link media="screen" href="{THEME}/style/styles.css" type="text/css" rel="stylesheet" /> <!-- Все стили и стили при размере экрана более 1340px -->
<link rel="stylesheet" media="screen and (min-width: 690px) and (max-width: 999px)" href="{THEME}/style/adap-phone-tablet.css" />
<link rel="stylesheet" media="screen and (min-width: 1000px) and (max-width: 1309px)" href="{THEME}/style/adap-pc-tablet.css" />
Answer the question
In order to leave comments, you need to log in
Try this script:
<script>
;(function($){
var portraitWidth,landscapeWidth;
$(window).bind("resize", function(){
if(Math.abs(window.orientation) === 0){
if(/Android/.test(window.navigator.userAgent)){
if(!portraitWidth)portraitWidth=$(window).width();
}else{
portraitWidth=$(window).width();
}
$("html").css("zoom" , portraitWidth/320 );
}else{
if(/Android/.test(window.navigator.userAgent)){
if(!landscapeWidth)landscapeWidth=$(window).width();
}else{
landscapeWidth=$(window).width();
}
$("html").css("zoom" , landscapeWidth/320 );
}
}).trigger("resize");
})(jQuery);
</script>
<script>
$(window).bind('resize load', function(){
if ($(window).width() >= 320 && $(window).width() <= 689) {
$("html").css("zoom", $(window).width()/320 );
} else {
$("html").css("zoom", 0);
}
});
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question