Javascript-форум (https://javascript.ru/forum/)
-   Мобильный JavaScript (https://javascript.ru/forum/mobile/)
-   -   Как отобразить часть сайта (https://javascript.ru/forum/mobile/38001-kak-otobrazit-chast-sajjta.html)

complexityclass 16.05.2013 18:08

Как отобразить часть сайта
 
Добрый вечер.
Нужно чтобы в браузере android WebView отображалась не вся страница, а только часть.
<!DOCTYPE html>
<html>
<head>
   <body class="page dhtmlx_winviewport dhtmlx_skin_dhx_terrace">
      <div style="position: absolute; left: -200px; top: 0px; width: 100px;          height: 1px; visibility: hidden; overflow: hidden;">
     <div style="position: absolute; left: -200px; top: 0px; width: 100px;   height: 1px; visibility: hidden; overflow: hidden;"></div>
    <div style="position: absolute; left: -200px; top: 0px; width: 100px; height: 1px; visibility: hidden; overflow: hidden;"></div>
    <div style="position: absolute; left: -200px; top: 0px; width: 100px;  height: 1px; visibility: hidden; overflow: hidden;"></div>
    <div class="page__wrapper">
<!-- Служебные -->
    <iframe id="frRun" frameborder="0" style="width:0;height:0"      src="javascript:;" name="frRun">
<div id="info" onmouseout="infoPopUp(this)" onmouseover="infoPopUp(this,1)">
<iframe class="dhx_modal_cover_ifr" frameborder="0" src="javascript:false;" style="z-index: 1498;">
<div class="dhx_modal_cover_dv" style="z-index: 1498; position: fixed;"></div>
<div class="dhx_content_vp_cover" style="display: none;"></div>
<div class="dhx_carcass_resmove" style="display: none; position: fixed;"></div>
<div class="dhtmlx_window_active" dir="ltr" style="z-index: 1500; left: 710px; top: 16.5px; width: 500px; height: 555px; position: fixed; cursor: n-resize;">
<div class="dhxLayout_Sizer_dhx_terrace" style="display: none;"></div>
<iframe class="dhx_modal_cover_ifr" frameborder="0" src="javascript:false;" style="display: none; z-index: 0;">
<div class="dhx_modal_cover_dv" style="display: none; z-index: 0;"></div>
<div class="dhx_content_vp_cover" style="display: none;"></div>
<div class="dhx_carcass_resmove" style="display: none;"></div>
</body>
</html>


Мне нужно отобразить только то, что в
<div class="dhtmlx_window_active></div>
, на все окно браузера. Можно ли это сделать с помощью javascript без JQuery(чтобы работало в android WebView) ?

Заранее спасибо.

animhotep 17.05.2013 11:28

это сожно сделать с помощью css. определить что устройство мобильное (handheld) и скрыть не нужные блоки http://htmlbook.ru/css/media


Часовой пояс GMT +3, время: 01:50.