पर काम नहीं करता है, मैं खिड़की की ऊंचाई के आधार पर अलग-अलग ब्राउज़र व्यवहार करने की कोशिश कर रहा हूं। मुझे क्या चाहिए यदि उपयोगकर्ता नेटबुक पर है तो मेरी स्क्रिप्ट केवल सीएसएस ओवरफ्लो-वाई को 'ऑटो' पर सक्रिय करेगी, इसलिए यदि सामग्री स्क्रीन से बड़ी है तो उपयोगकर्ता सब कुछ देख सकता है। यदि उपयोगकर्ता एक बड़ी स्क्रीन में है, तो मैं अतिप्रवाह छिपाना चाहता हूं और मेरा मुख्य div ओवरफ्लो = 'ऑटो' के साथ है, इसलिए पाद लेख स्क्रीन के नीचे हो सकता है, लेकिन स्क्रीन से बड़ी होने पर सामग्री को भी विचलित किया जा सकता है।
इस के लिए बुनियादी कोड पोस्टिंग, यह मैक पर बड़ी स्क्रीन पर काम करता है, लेकिन इंटरनेट एक्सप्लोरर पर यह
क्या करना है नहीं, या तो छोटे या बड़े स्क्रीन पर करता है ...?
अग्रिम में मदद के लिए धन्यवाद
सीएसएस
html, body {
min-width: 600px;
margin: 0;
padding: 0;
overflow: hidden;
}
#header {
position:relative; /* IE7 overflow bug */
clear:both;
float:left;
width:100%;
height: 200px;
overflow: hidden;
}
#main {
position:relative; /* IE7 overflow bug */
clear:both;
float:left;
width:100%;
overflow-x: hidden;
}
#footer {
position:relative; /* IE7 overflow bug */
clear:both;
float:left;
width:100%;
height: 100px;
overflow: hidden;
}
jQuery
if(typeof(window.innerWidth) == 'number') {
// No-IE
var screen_height = window.innerHeight;
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
//IE 6 +
var screen_height = document.documentElement.clientHeight;
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
//IE 4
var screen_height = document.body.clientHeight;
}
var header_height = $('#header').height();
var footer_height = $('#footer').height();
var main_height = screen_height - header_height - footer_height;
//
if (navigator.userAgent.toLowerCase().search("iphone") > -1 || navigator.userAgent.toLowerCase().search("ipod") > -1) {
$('body').css('overflow-y', 'auto');
} else {
if(screen_height > 550) {
$('#main').css('height', main_height + 'px');
$('#main').css('overflow-y', 'auto');
} else {
$('html, body').css('overflow-y', 'auto');
}
}
IE पर वास्तव में क्या होता है या नहीं होता है? –
हैलो, आईई ओवरफ़्लो में हमेशा छिपा रहता है, इसलिए मैं सभी सामग्री नहीं देख सकता। आईई 7, 8 और 9 में परीक्षण। धन्यवाद। – Pluda
क्या कुछ भी होता है यदि आप इससे छुटकारा पाएं! महत्वपूर्ण? – Vervious