网站没有在智能手机上显示 - GWT& Tomcat的

时间:2013-10-28 10:09:22

标签: css tomcat gwt smartphone

我开发了一个GWT项目并将其托管在Tomcat服务器上。 由于我希望网站根据所用设备的分辨率进行不同的可视化,我在样式表中添加了@media标签。

    .infoUtente {
    background-color: #e0fbe0;
    border-style: solid dotted;
    border-color: #1b6b52;
    border-width: 5px;
}

.aboutUs {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
    font-size: 20px;
    background-color: #e0fbe0;
    border-style: double;
    border-radius: 10px;
    border-color: #1b6b52;
    border-width: 5px;
}

.statsLbl {
    font-size: 15px;
    color: #1b6b52;
    font-weight: bold;
}

/*desktop*/
@media only screen and (min-width: 900px) {
    .titolo {
        text-align: left;
        color: #1b6b52;
        margin-left: 30px;
        font-size: 40px;
        text-shadow: 0.1em 0.1em 0.2em grey;
        padding-top: auto;
        padding-bottom: auto;
    }
}

/*smartphones*/
@media only screen and (max-width : 900px) {
    .titolo {
        text-align: left;
        color: #1b6b52;
        margin-left: 10px;
        font-size: 15px;
        text-shadow: 0.1em 0.1em 0.2em grey;
        padding-top: auto;
        padding-bottom: auto;
    }
}

.refreshBtn {
    width: 45px;
    height: 55px;
    float: right;
}

@media only screen and (min-width: 900px) {
    .loginLbl {
        font: bold 15px arial, helvetica, verdana, sans-serif;
        color: #1b6b52;
    }
}

@media only screen and (max-width : 900px) {
    .loginLbl {
        font: bold 11px arial, helvetica, verdana, sans-serif;
        color: #1b6b52;
    }
}

.loginPanel {
    float: right;
    /*padding-top: 23px;*/
}

.debug {
    border-style: double;
}

@media only screen and (min-width: 900px) {
    .statsPanel {
        border-style: double;
        border-radius: 10px;
        border-color: #acbeca;
        border-width: 5px;
        width: 100%;
        height: 40%;
        bottom: 40%;
    }
}

@media only screen and (max-width : 900px) {
    .statsPanel {
        display: none;
    }
}

.cellCol {
    font-size: 11px;
    font-weight: bold;
}

@media only screen and (min-width: 900px) {
    .menuPnl {
        width: 100%;
        height: 50%;
        padding-right: 20px;
        padding-left: 20px;
        padding-top: 20px;
    }
}

@media only screen and (max-width : 900px) {
    .menuPnl {
        width: 100%;
        height: 50%;
    }
}

.centerPnl {
    width: 100%;
    height: 100%;
}

/*nascondo northpanel e porto titolo e login panel a sinistra?*/
.northPanel {
    background-color: #e6f0b4;
    width: 100%;
    height: 100%;
    border-style: double;
    border-color: #1b6b52;
    border-width: 5px;
}

@media only screen and (min-width: 900px) {
    .westPanel {
        width: 100%;
        height: 100%;
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media only screen and (max-width : 900px) {
    .westPanel {
        width: 100%;
        height: 100%;
    }
}

@media only screen and (min-width: 900px) {
    .southPanel {
        width: 100%;
        height: 100%;
        float: right;
    }
}

@media only screen and (max-width : 900px) {
    .southPanel {
        display: none;
    }
}

.bottomBtn {
    float: right;
    margin-right: 10px;
    font-size: 11px;
    height: 25px;
    border-radius: 5px;
    color: #1b6b52;
    font-weight: bold;
}

.twitter {
    line-height: 25px;
}

@media only screen and (min-width: 900px) {
    .legendPnl {
        border-left-style: double;
        border-left-color: #1b6b52;
        border-left-width: 5px;
        border-bottom-style: double;
        border-bottom-color: #1b6b52;
        border-bottom-width: 5px;
        background-color: #e6f0b4;
        width: 20%;
        position: absolute;
        top: 5px;
        right: 2px;
    }
}

@media only screen and (max-width : 900px) {
    .legendPnl {
        display: none;
    }
}

@media only screen and (min-width: 900px) {
    .map {
        width: 100%;
        height: 100%;
        border-style: double;
        border-color: #1b6b52;
        border-width: 5px;
    }
}

@media only screen and (max-width : 900px) {
    .map {
        width: 100%;
        height: 100%;
    }
}

.mainPanel {
    width: 100%;
    height: 100%;
    background-color: #e6f0b4;
}

@media only screen and (min-width: 900px) {
    .leftButton {
        width: 100%;
        margin-top: 20px;
        background-color: #1b6b52;
        color: white;
        font: normal 15px arial, helvetica, verdana, sans-serif;
        text-shadow: black 0.1em 0.1em 0.2em;
        -moz-border-radius: 15px;
        border-radius: 15px;
    }
}

@media only screen and (max-width : 900px) {
    .leftButton {
        width: 100%;
        margin-top: 5px;
        background-color: #1b6b52;
        color: white;
        font: normal 10px arial, helvetica, verdana, sans-serif;
        text-shadow: black 0.1em 0.1em 0.2em;
        -moz-border-radius: 7px;
        border-radius: 7px;
    }
}

@media only screen and (min-width: 900px) {
    .loginButton {
        width: 50px;
        height: 32px;
        background-color: #1b6b52;
        color: white;
    }
}

@media only screen and (max-width : 900px) {
    .loginButton {
        width: 40px;
        height: 18px;
        background-color: #1b6b52;
        color: white;
    }
}

@media only screen and (min-width: 900px) {
    .loginBox {
        width: 100px;
        height: 32px;
    }
}

@media only screen and (max-width : 900px) {
    .loginBox {
        width: 60px;
        height: 18px;
    }
}

.slideShow {
    background-color: #32353c;
    border-style: double;
    border-radius: 10px;
    border-color: #1b6b52;
    border-width: 5px
}


.userInfo {
    text-align: center;
    color: #1b6b52;
    font-weight: bold;
}

.registrazionePnl {
    width: 18%;
    font-size: 15px;
    border-style: double;
    border-radius: 10px;
    border-color: #1b6b52;
    border-width: 5px;
}

@media only screen and (min-width: 900px) {
    .inserisciPnl {
        border-style: double;
        border-radius: 10px;
        border-color: #1b6b52;
        border-width: 5px;
    }
}

@media only screen and (max-width : 900px) {
    .inserisciPnl {
        font-size: 10px;
    }
}

#closeButton {
    margin: 15px 6px 6px;
}

如果我尝试在PC上调整浏览器大小,可视化会正确更改(某些面板和按钮消失),并且网页具有所需行为。 但是,如果我尝试从智能手机访问该网站,则不会显示任何内容。 你认为这是一个与.css相关的问题,还是tomcat和智能手机访问的一般问题? 感谢

0 个答案:

没有答案
相关问题