如何在调整窗口大小时重置CSS?有了重载js功能

时间:2014-06-02 05:42:44

标签: javascript css window reload reset

我的问题是,当我刷新我的HTML时,它不尊重css中的百分比!!

是否有一个功能可以帮助我重置我的CSS并尊重窗口的大小?

这是我的js。

$(document).ready(function() {
        $('#fullpage').fullpage({
            anchors: ['firstPage', 'secondPage', '3rdPage'],
            slidesNavigation: true,     
            css3: true      
        });



    }); //Termina document.ready

这是我的css

    section{
        text-align: center;
    }

    #section0 {
        background: url(../img/fondo_negro.jpg);
    }

    #section1 {
        background: url(../img/fondo_rojo.jpg);
    }

    #section2 {
        background: url(../img/fondo_blanco.jpg);
    }

    #section3 {
        background: url(../img/fondo_negro.jpg);
    }

    .section.table, .slide.table {
    display: table;
    width: 100%;
    }

    .section{
        text-align: center;
    }

    .intro p{
        color: white;
    }

    #section2 h1{
        color: blue;
    }

    .easing {
    -webkit-transition: all 0.7s ease-out;
    -moz-transition: all 0.7s ease-out;
    -o-transition: all 0.7s ease-out;
    transition: all 0.7s ease-out;
    }

    .slide {
        float: left;
    }

    .slide h1{
        text-align: center;
    }

    .slide, .slidesContainer {
        height: 100%;
        display: block;
    }

        .slidesContainer {
    float: left;
    position: relative;

    }

    .section {
        position: relative;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .controlArrow {
    position: absolute;
    top: 50%;
    cursor: pointer;
    width: 0;
    height: 0;
    border-style: solid;
    margin-top: -38px;
    }

    .controlArrow.prev {
    left: 15px;
    width: 0;
    border-width: 38.5px 34px 38.5px 0;
    border-color: transparent #fff transparent transparent;
    }
    .controlArrow.next {
    right: 15px;
    border-width: 38.5px 0 38.5px 34px;
    border-color: transparent transparent transparent #fff;
    }
    .tableCell {
    display: table-cell;
    vertical-align: middle;
    width: 100%;
    height: 100%;
    }
    .fullPage-slidesNav {
    position: absolute;
    z-index: 4;
    left: 50%;
    opacity: 1;
    }
    .fullPage-slidesNav.bottom {
    bottom: 65px; 
    }
    #fullPage-nav li,
.fullPage-slidesNav li {
    display: block;
    width: 14px;
    height: 13px;
    margin: 7px;
    position:relative;
}

        .fullPage-slidesNav li {
        display: inline-block;
    }

    #fullPage-nav li .active span,.fullPage-slidesNav .active span {
    background: white;
}


    #fullPage-nav span,
    .fullPage-slidesNav span {
        top: 2px;
        left: 2px;
        width: 8px;
        height: 8px;
        border: 1px solid #000;
        background: rgba(0, 0, 0, 0);
        -webkit-border-radius: 50%;
        -moz-border-radius: 50%;
        border-radius: 50%;
        position: absolute;
        z-index: 1;
    }






        #header, #footer{
            position:fixed;
            height: 50px;
            display:block;
            width: 100%;
            background: #292727;
            z-index:9;
            text-align:center;
            color: #fff;
            padding: 20px 0 0 0;
        }

        #header{
            top:0px;
        }

        #footer{
            bottom:0px;
        }









    h1,h2,h3,h4,h5,h6 {
        font-weight: normal;
        font-size: 100%;
        margin:0;
        padding:0;
        color:#444;
    }






    body{
        font-family: arial,helvetica;
        color: #333;
        color: rgba(0,0,0,0.5);

    }

    h1{
        font-size: 6em;

    }





    p{
        font-size: 2em;
    }


     .intro p{
        width: 50%;
        margin: 0 auto;
        font-size: 1.5em;
    }

0 个答案:

没有答案