首页 > 解决方案 > css 不能在 ios 上运行

问题描述

我正在制作一个带有 3d 字母的网页,但在 iphone 中对我来说似乎是错误的,有谁知道解决方案可能是什么?

我把代码留给你,你必须在三个文件中放入一个 Menu2.html 一个 estilos.css 一个 script.js 和一个 jquery.js

主要问题是,在 safari 中,前面部分带有按钮以及字母右侧下方的所有内容,所以我不知道我能做些什么让它看起来像上面

$('.btn-ver-menu').on('click', function(){
    
    $('.pagina-izquierda').addClass("pagina-izquierda2");
    
    setTimeout(function(){
        
        $('.pagina-derecha').addClass("pagina-derecha2");
 
    }, 300)
    
})


$('.btn-cerrar').on('click', function(){
    
    $('.pagina-derecha').removeClass("pagina-derecha2");
    
    setTimeout(function(){
        
    $('.pagina-izquierda').removeClass("pagina-izquierda2");
 
    }, 300)
    
})
*{
    padding: 0;
    margin: 0;
    font-family: "Oswald", sans-serif;
}

body{
    background-attachment: fixed;
    background-position: center;
}

.contenedor-menu{
    width: 1000px;
    height: 680px;
    display: flex;
    margin: auto;
    margin-top: 100px;
    perspective: 1500px;
}

.pagina-izquierda,
.pagina-central,
.pagina-derecha{
    padding: 10px;
    width: 100%;
    height: 100%;
    background: white;
}

.pagina-izquierda{
background: #ffffff;
background: -moz-linear-gradient(left, #ffffff 0%, #fcfcfc 0%, #ededed 100%);
background: -webkit-gradient(left top, right top, color-stop(0%, #ffffff), color-stop(0%, #fcfcfc), color-stop(100%, #ededed));
background: -webkit-linear-gradient(left, #ffffff 0%, #fcfcfc 0%, #ededed 100%);
background: -o-linear-gradient(left, #ffffff 0%, #fcfcfc 0%, #ededed 100%);
background: -ms-linear-gradient(left, #ffffff 0%, #fcfcfc 0%, #ededed 100%);
background: linear-gradient(to right, #ffffff 0%, #fcfcfc 0%, #ededed 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed', GradientType=1 );
}

.pagina-central{
background: #fcfcfc;
background: -moz-linear-gradient(left, #fcfcfc 0%, #ffffff 28%, #ededed 100%);
background: -webkit-gradient(left top, right top, color-stop(0%, #fcfcfc), color-stop(28%, #ffffff), color-stop(100%, #ededed));
background: -webkit-linear-gradient(left, #fcfcfc 0%, #ffffff 28%, #ededed 100%);
background: -o-linear-gradient(left, #fcfcfc 0%, #ffffff 28%, #ededed 100%);
background: -ms-linear-gradient(left, #fcfcfc 0%, #ffffff 28%, #ededed 100%);
background: linear-gradient(to right, #fcfcfc 0%, #ffffff 28%, #ededed 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed', GradientType=1 );
}

.contenedor-lista{
    width: 100%;
    height: 100%;
}

.text1 {
    margin-top: auto;
    text-align: center;
}

.lista-uno,
.lista-dos,
.lista-tres,
.lista-cuatro,
.lista-cinco,
.lista-seis,
.lista-siete,
.lista-ocho{
    width: 100%;
    text-align: center;
}

.lista-uno h1,
.lista-dos h1,
.lista-tres h1,
.lista-cuatro h1,
.lista-cinco h1,
.lista-seis h1,
.lista-siete h1,
.lista-ocho h1{
    font-size: 20px;
    text-align: center;
}

.lista-uno img,
.lista-dos img,
.lista-tres img,
.lista-cuatro img,
.lista-cinco img,
.lista-seis img,
.lista-siete img,
.lista-ocho img{
    width: 100px;
    height: 80px;
}

.lista-uno p,
.lista-dos p,
.lista-tres p,
.lista-cuatro p,
.lista-cinco p,
.lista-seis p,
.lista-siete p,
.lista-ocho p{
    font-size: 14px;
}

.lista-uno hr,
.lista-dos hr,
.lista-tres hr,
.lista-cuatro hr,
.lista-cinco hr,
.lista-seis hr,
.lista-siete hr,
.lista-ocho hr{
    width: 100px;
    height: 3px;
    margin: auto;
    border-style: none;
    background: -webkit-linear-gradient(left, red, blue, #23cbff);
    margin-top: 10px;
}



/*Aplicando Efectos de movimientos*/



.pagina-izquierda{
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    transition: all 1s;
    -webkit-transition: all 1s;
    transform-origin: right;
    -webkit-transform-origin: right;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    z-index: 10;
}

.pagina-izquierda2{
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
}

.lado{
    backface-visibility: hidden;   
    -webkit-backface-visibility: hidden;
}

.delante{
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    width: 100%;
    height: 100%;
    background: white;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    border: 6px double #3f3f3f;
    border-left: none;
}

.delante img{
    width: 250px;
    margin: auto;
    margin-top: 24px;
}

.delante h1{
    font-size: 24px;
    text-align: center;
}

.delante hr{
    width: 200px;
    height: 3px;
    border-style: none;
    margin: auto;
    background: -webkit-linear-gradient(left, #f4e48a, #212120, #fa4632);
    margin-top: 10px;
}

.delante h3{
    font-weight: 100;
    margin-top: 20px;
}

.delante button{
    width: 200px;
    padding: 6px;
    background: orange;
    border-style: none;
    border-radius: 8px;
    color: white;
    margin-top: 10px;
    transition: all 300ms;
    cursor: pointer;
}

.delante button:hover{
    transform: translateY(10px);
    box-shadow: 0px -5px 10px 0px #969696;
}


.delante h4{
    margin-top: 10px;
}

.delante p{
    margin-top: 10px;
}

.delante ul{
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.delante ul h5{
    font-size: 16px;
}

.delante ul label{
    font-size: 14px;
    margin-top: 4px;
    margin-left: 10px;
}



/*Pagina derecha animacion*/

.pagina-derecha{
    transform: rotateY(-180deg);
    -webkit-transform: rotateY(-180deg);
    transform-origin: left;
    -webkit-transform-origin: left;
    transition: 1s;
    -webkit-transition: 1s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.pagina-derecha2{
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
}

.lado-pagina-derecha{
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.pagina-derecha-atras{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    border: 6px double #3f3f3f;
    border-right: none;
}

.btn-cerrar{
    position: absolute;
    top: -20px;
    right: -20px;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 3;
    filter: blur(1px);
    transition: all 300ms;
    cursor: pointer;
}

.btn-cerrar:hover{
    filter: blur(0px);
}

@media only screen and (max-width: 667px) and (min-width: 300px) {

    .contenedor-menu {
        width: 350px;
        height: 300px;
    }

    .delante img {
        width: 40px;
    }

    .delante hr {
    width: 75px;
    height: 3px;
    margin-top: 0px;
    }

    .delante button {
        width: 75px;
        padding: 0px;
    }
    
    .delante h3 {
        font-size: 13px;
        margin-top: 0px;
    }

    .contenedor-lista {
        width: 50%;
        height: 50%;
    }

    .delante p {
        font-size: 6.5px;
        margin-top: 5px;
    }

    .text1 {
        font-size: 6.5px;
    }

    .lista-uno,
    .lista-dos,
    .lista-tres,
    .lista-cuatro,
    .lista-cinco,
    .lista-seis,
    .lista-siete,
    .lista-ocho{
        width: 100%;
        text-align: center;
    }

    .lista-uno h1,
    .lista-dos h1,
    .lista-tres h1,
    .lista-cuatro h1,
    .lista-cinco h1,
    .lista-seis h1,
    .lista-siete h1,
    .lista-ocho h1{
        text-align: center;
        font-size: 8px;
    }

    .lista-uno img,
    .lista-dos img,
    .lista-tres img,
    .lista-cuatro img,
    .lista-cinco img,
    .lista-seis img,
    .lista-siete img,
    .lista-ocho img{
        width: 50px;
        height: 40px;
    }

    .lista-uno p,
    .lista-dos p,
    .lista-tres p,
    .lista-cuatro p,
    .lista-cinco p,
    .lista-seis p,
    .lista-siete p,
    .lista-ocho p{
        font-size: 5px;
    }

    .lista-uno hr,
    .lista-dos hr,
    .lista-tres hr,
    .lista-cuatro hr,
    .lista-cinco hr,
    .lista-seis hr,
    .lista-siete hr,
    .lista-ocho hr{
        width: 25px;
        height: 1.5px;
        margin: auto;
        border-style: none;
        background: -webkit-linear-gradient(left, red, blue, #23cbff);
        margin-top: 2.5px;
    }

    .lista-uno h4,
    .lista-dos h4,
    .lista-tres h4,
    .lista-cuatro h4,
    .lista-cinco h4,
    .lista-seis h4,
    .lista-siete h4,
    .lista-ocho h4{
        font-size: 5px;
        text-align: center;
    }
}

@media only screen and (max-width: 950px) and (min-width: 667px) {

    .contenedor-menu {
        width: 550px;
        height: 485px;
    }

    .delante img {
        width: 80px;
    }

    .delante hr {
    width: 120px;
    height: 3px;
    margin-top: 0px;
    }

    .delante button {
        width: 120px;
        padding: 0px;
    }
    
    .delante h3 {
        font-size: 22px;
        margin-top: 0px;
    }

    .contenedor-lista {
        width: 100%;
        height: 100%;
    }

    .delante p {
        font-size: 13.5px;
        margin-top: 5px;
    }

    .text1 {
        font-size: 12px;
    }

    .lista-uno,
    .lista-dos,
    .lista-tres,
    .lista-cuatro,
    .lista-cinco,
    .lista-seis,
    .lista-siete,
    .lista-ocho{
        width: 100%;
        text-align: center;
    }

    .lista-uno h1,
    .lista-dos h1,
    .lista-tres h1,
    .lista-cuatro h1,
    .lista-cinco h1,
    .lista-seis h1,
    .lista-siete h1,
    .lista-ocho h1{
        text-align: center;
        font-size: 16px;
    }

    .lista-uno img,
    .lista-dos img,
    .lista-tres img,
    .lista-cuatro img,
    .lista-cinco img,
    .lista-seis img,
    .lista-siete img,
    .lista-ocho img{
        width: 50px;
        height: 40px;
    }

    .lista-uno p,
    .lista-dos p,
    .lista-tres p,
    .lista-cuatro p,
    .lista-cinco p,
    .lista-seis p,
    .lista-siete p,
    .lista-ocho p{
        font-size: 10px;
    }

    .lista-uno hr,
    .lista-dos hr,
    .lista-tres hr,
    .lista-cuatro hr,
    .lista-cinco hr,
    .lista-seis hr,
    .lista-siete hr,
    .lista-ocho hr{
        width: 25px;
        height: 3px;
        margin: auto;
        border-style: none;
        background: -webkit-linear-gradient(left, red, blue, #23cbff);
        margin-top: 2.5px;
    }

    .lista-uno h4,
    .lista-dos h4,
    .lista-tres h4,
    .lista-cuatro h4,
    .lista-cinco h4,
    .lista-seis h4,
    .lista-siete h4,
    .lista-ocho h4{
        font-size: 10px;
        text-align: center;
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Restaurante Club de Tenis Javea</title>
    <!-- FONT AWESOME -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <!-- FONT OSWALD -->
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400&display=swap" rel="stylesheet">
    <!-- CUSTOM CSS -->
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="./css/estilos.css">
</head>
<body ontouchstart>

    <div class="menu-btn">
        <i class="fas fas fa-bars"></i>
    </div>
    
    <div class="container">
        <nav class="nav-main">
            <a href="./index.html">
                <img src="img/Logo1.png" alt="Restaurante-logo" class="nav-brand">
            </a>
            <ul class="nav-menu">
                <li>
                    <a href="tel:+34965791911"><i class="fa fa-phone"></i> Reserva</a>
                </li>
                <li>
                    <a href="./index.html">Inicio</a>
                </li>
                <li>
                    <a>Cartas <i class="fas fas fa-angle-down"></i></a>
                    <ul class="nav-menu1">
                        <li>
                            <a href="./Menu1.html">Aperitivos-Tapas</a>
                        </li>
                        <li>
                            <a href="./Menu2.html">Entradas</a>
                        </li>
                        <li>
                            <a href="./Menu3.html">Arroces</a>
                        </li>
                        <li>
                            <a href="./Menu4.html">Carnes</a>
                        </li>
                        <li>
                            <a href="./Menu5.html">Pescados</a>
                        </li>
                        <li>
                            <a href="./Menu6.html">Postres</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="./Ubicacion.html">Ubicación</a>
                </li>
                <li>
                    <a href="./contactanos.html">Contactanos</a>
                </li>
            </ul>
        </nav>
        <hr>

    </div>
        
    <div class="contenedor-menu">
        
        <div class="pagina-izquierda">
            
            <div class="delante lado">
                
                <img src="./img/Logo1.png">
                <h1>Entradas</h1>
                <hr>
                <h3>Restaurante Club Tenis javea</h3>
                <button class="btn-ver-menu">Ver Menu</button>
                <p>Av. de la Fontana, 66</p>
                <p>Para reservas llamar al +34 965 79 19 11</p>
            </div>
            
            <div class="atras lado">
                
                <div class="contenedor-lista">
                    <div class="lista-uno">
                        <h1>Ensalada Romana</h1>
                        <h4>Romana salad - Salade Romaine - Romana salat</h4>
                        <hr>
                    </div>
                    <div class="lista-dos">
                        <h1>Ensalda de la casa</h1>
                        <h4>Home salad - Salade maison - Hausgemachter salat</h4>
                        <hr>
                    </div>
                    <div class="lista-tres">
                        <h1>Ensalada Cantábria</h1>
                        <h4>Cantábrica salad - Salade cantábrica - Cantábrica salat</h4>
                        <hr>
                    </div>
                    <div class="lista-cuatro">
                        <h1>Melón con jamón ibérico</h1>
                        <h4>Iberica ham with melon - Melon au jambon - Melone mit Iberischer Schinken</h4>
                    </div>
                </div>
                
            </div>
            
        </div>
        
        <div class="pagina-central">
            
            <div class="contenedor-lista">
                    <div class="lista-uno">
                        <h1>Espárragos mimosa</h1>
                        <h4>Asparagus mimosa - Asperges mimosa - Spargeln mimosa</h4>
                        <hr>
                    </div>
                    <div class="lista-dos">
                        <h1>Sopa del dia</h1>
                        <h4>Soup of the day</h4>
                        <hr>
                    </div>
                    <div class="lista-tres">
                        <h1>Crepe de gamba</h1>
                        <h4>Shrimp crepe - Crêpe aux grevettes - Pfannkuchen mit krahben</h4>
                        <hr>
                    </div>
                    <div class="lista-cuatro">
                        <h1>Berenjena rellena</h1>
                        <h4>Stuffed aubergine - Aubergine farcie - Obergine gefullt</h4>
                    </div>
                </div>
            
        </div>
        
        <div class="pagina-derecha">
            
            <div class="contenedor-lista lado-pagina-derecha">
                    <div class="lista-uno">
                        <h1>Gazpacho Andaluz (Solo por temporada)</h1>
                        <h4>Gazpacho - Gazpacho andalou - Suppe anadakusse</h4>
                        <hr>
                    </div>
                    <div class="lista-dos">
                        <h1>Verduras plancha</h1>
                        <h4>Grilled vegetables - Legumes a la planche - Gergrilld gemüse</h4>
                    </div>
                </div>
            <div class="pagina-derecha-atras lado-pagina-derecha"></div>
            <div class="btn-cerrar lado-pagina-derecha">X</div>
        </div>
        
    </div>    


        <section class="social">
            <p>Síguenos</p>
            <div class="links">
                <a href="https://www.facebook.com/restauranteclubdetenisjaveapaellas/">
                    <i class="fab fa-facebook-f"></i>
                </a>
                <a href="https://www.instagram.com/rest.clubdetenisjavea/">
                    <i class="fab fa-instagram"></i>
                </a>
            </div>
        </section>

    
    
        <div class="footer-links">
            <div class="footer-container">
                <ul>
                    <li>
                        <h3>Información</h3>
                    </li>
                    <li>
                        <a href="./aviso_legal.html">
                            Aviso Legal
                        </a>
                    </li>
                    <li>
                        <a href="./Politica_privacidad.html">
                            Política de privacidad
                        </a>
                    </li>
                    <li>
                        <a href="./Politica_de_cookies.html">
                            Política de cookies
                        </a>
                    </li>
                </ul>
                <ul>
                    <li>
                        <h3>Contacto</h3>
                    </li>
                    <li>
                        <a href="./contactanos.html">
                            Contacta con nosotros
                        </a>
                    </li>
                    <li>
                        <a href="tel:+34965791911">
                            Reservas
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    
    <footer class="footer">
        <h3>RCTJ Copyright</h3>
    </footer>

    <!-- SCROLL REVEAL -->
     <script src="https://unpkg.com/scrollreveal"></script>
    <!-- CUSTOM JS -->
    <script src="main.js"></script>
    <script src="js/jquery.js"></script>
    <script src="js/script.js"></script>

</body>
</html>

标签: javascripthtmlcss

解决方案


推荐阅读