Visualizzazione dei risultati da 1 a 2 su 2

Discussione: box input text

  1. #1

    box input text

    salve ho questo script



    <script>
    window.onload=function(){


    var event = document.getElementById("event");
    event.onclick=function(){
    var event = document.getElementById("event");
    var content = document.getElementById("contenutomostra");
    if(content.style.display == "none") {
    content.style.display = "";
    event.innerHTML = "Mostra";
    }
    else {
    content.style.display = "none";
    event.innerHTML = "Mostra";
    }
    }










    var event2 = document.getElementById("event2");
    event2.onclick=function(){
    var event2 = document.getElementById("event2");
    var content2 = document.getElementById("contenutovalore");
    if(content2.style.display == "none") {
    content2.style.display = "";
    event2.innerHTML = "Valore";
    }
    else {
    content2.style.display = "none";
    event2.innerHTML = "Valore";
    }
    }






    }
    </script>








    <button id="event">Mostra</button>








    <button id="event2">Valore</button>






    <div id="contenutomostra" style="display:none">
    <input type="text" value="MOSTRA">
    </div>


    <div id="contenutovalore" style="display:none">
    <input type="text" value="VALORE">
    </div>



    I bottoni funzionano regolarmente, è possibile modificare questo .... è possibile una volta cliccata la seconda opzione (VALORE) in automatico nello stesso posto si nasconda la prima (MOSTRA) ??
    Come si puo modificare lo script ??

    Grazie

    Un saluto.

  2. #2
    ciao

    ho trovato nel frattempo questo :



    <!doctype html>


    <html lang="en" class="no-js">


    <head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1">



    <link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700' rel='stylesheet' type='text/css'>



    <link rel="stylesheet" href="css/reset.css">
    <!-- CSS reset -->

    <link rel="stylesheet" href="css/style.css">
    <!-- Resource style -->

    <script src="js/modernizr.js"></script>
    <!-- Modernizr -->


    <title>Responsive Tabbed Navigation | CodyHouse</title>


    </head>


    <body>


    <header>


    </header>


    <div class="cd-tabs">

    <nav>
    <ul class="cd-tabs-navigation">
    <li><a data-content="descrizione" class="selected" href="#0">Descrizione</a></li>
    <li><a data-content="lavori" href="#0">Lavori</a></li>
    <li><a data-content="pubblicita" href="#0">Pubblicita</a></li>


    </ul>
    </nav>



    <ul class="cd-tabs-content">



    <li data-content="descrizione" class="selected">




    <textarea name="testo1" style="width:390px;height:90px;" class="normales"></textarea> </li>





    <li data-content="lavori">



    <textarea name="lavori" style="width:390px;height:90px;" class="normales"></textarea> </li>




    <li data-content="pubblicita">



    <textarea name="pubblicita" style="width:390px;height:90px;" class="normales"></textarea> </li>








    </ul> <!-- cd-tabs-content -->
    </div> <!-- cd-tabs -->
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/main.js"></script> <!-- Resource jQuery -->
    </body>
    </html>



    funziona tutto , per colpa probabilmente dei fogli di stile fa un casino impressionante importandolo sulla mia attuale pagina, è possibile fare in modo di annullare i fogli di stile in specifico in alcune parti ? esempio nelle varie tabelle tutte le altezze sono aumentate a dismisura , vi mostro il foglio di stile che non sono riuscito a modificare come volevo a mio piacimento......

    codice:
    
    
    
    
    
    
    /* -------------------------------- 
    
    
    Primary style
    
    
    -------------------------------- */
    *, *::after, *::before {
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
    }
    
    
    *::after, *::before {
      content: '';
    }
    
    
    body {
      font-size: 120%;
      font-family: "PT Sans", sans-serif;
      color: #f8f7ee;
      background-color: ;
    }
    
    
    a {
      color: #f05451;
      text-decoration: none;
    }
    
    
    /* -------------------------------- 
    
    
    Main components 
    
    
    -------------------------------- */
    header {
      position: relative;
      height: 0px;
      line-height: 50px;
      text-align: center;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    header h1 {
      font-size: 20px;
      font-size: 1.25rem;
    }
    @media only screen and (min-width: 420px;) {
      header {
        height: 30px;
        line-height: 50px;
      }
      header h1 {
        font-size: 26px;
        font-size: 1.625rem;
      }
    }
    
    
    .cd-tabs {
      position: relative;
      width: 420px;
      max-width: 420px;
    
    
      margin: 2em auto;
    }
    .cd-tabs:after {
      content: "";
      display: table;
      clear: both;
    }
    .cd-tabs::after {
      /* subtle gradient layer on top right - to indicate it's possible to scroll */
      position: absolute;
      top: 0;
      right: 0;
      height: 30px;
      width: 100px;
      z-index: 1;
      pointer-events: none;
     Visible;
      opacity: 1;
      -webkit-transition: opacity .3s 0s, visibility 0s 0s;
      -moz-transition: opacity .3s 0s, visibility 0s 0s;
      transition: opacity .3s 0s, visibility 0s 0s;
    }
    .no-cssgradients .cd-tabs::after {
      display: none;
    }
    .cd-tabs.is-ended::after {
      /* class added in jQuery - remove the gradient layer when it's no longer possible to scroll */
      visibility: hidden;
      opacity: 0;
      -webkit-transition: opacity .3s 0s, visibility 0s .3s;
      -moz-transition: opacity .3s 0s, visibility 0s .3s;
      transition: opacity .3s 0s, visibility 0s .3s;
    }
    .cd-tabs nav {
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      
      box-shadow: inset 0 -2px 3px rgba(203, 196, 130, 0.06);
    }
    @media only screen and (min-width: 420px;
    ) {
      .cd-tabs::after {
        display: none;
      }
      .cd-tabs nav {
        position: absolute;
        top: 20;
        left: 0;
        height: 40px;
        box-shadow: inset -2px 0 3px rgba(203, 196, 130, 0.06);
        z-index: 0;
      }
    }
    @media only screen and (min-width: 400px;
    ) {
      .cd-tabs nav {
        position: relative;
        float: none;
        background: transparent;
        box-shadow: none;
      }
    }
    
    
    .cd-tabs-navigation {
      width: 400px;
    }
    .cd-tabs-navigation:after {
      content: "";
      display: table;
      clear: both;
    }
    .cd-tabs-navigation li {
      float: left;
    }
    .cd-tabs-navigation a {
      position: relative;
      display: block;
      height: 40px;
      width: 100px;
      text-align: center;
      font-size: 12px;
      font-size: 0.75rem;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      font-weight: 700;
      color: #c3c2b9;
      padding-top: 10px;
    }
    .no-touch .cd-tabs-navigation a:hover {
      color: #29324e;
      background-color: rgba(233, 230, 202, 0.3);
    }
    .cd-tabs-navigation a.selected {
      background-color: #C0C0C0 !important;
      box-shadow: inset 0 0px 0; color: #29324e;
    }
    .cd-tabs-navigation a::before {
      /* icons */
      position: absolute;
      top: 12px;
      left: 0;
      margin-left: 0px;
      display: inline-block;
      height: 20px;
      width: 20px;
      background-repeat: no-repeat;
    }
    .cd-tabs-navigation a[data-content='inbox']::before {
      background-position: 0 0;
    }
    .cd-tabs-navigation a[data-content='new']::before {
      background-position: -20px 0;
    }
    .cd-tabs-navigation a[data-content='gallery']::before {
      background-position: -40px 0;
    }
    .cd-tabs-navigation a[data-content='store']::before {
      background-position: 0 0;
    }
    .cd-tabs-navigation a[data-content='settings']::before {
      background-position: -80px 0;
    }
    .cd-tabs-navigation a[data-content='trash']::before {
      background-position: -100px 0;
    }
    .cd-tabs-navigation a[data-content='inbox'].selected::before {
      background-position: 0 0px;
    }
    .cd-tabs-navigation a[data-content='new'].selected::before {
      background-position: -20px -20px;
    }
    .cd-tabs-navigation a[data-content='gallery'].selected::before {
      background-position: -40px -20px;
    }
    .cd-tabs-navigation a[data-content='store'].selected::before {
      background-position: -60px -20px;
    }
    .cd-tabs-navigation a[data-content='settings'].selected::before {
      background-position: -80px -20px;
    }
    .cd-tabs-navigation a[data-content='trash'].selected::before {
      background-position: -100px -20px;
    }
    @media only screen and (min-width: 400px;
    ) {
      .cd-tabs-navigation {
        /* move the nav to the left on medium sized devices */
        width: 80px;
        float: left;
      }
      .cd-tabs-navigation a {
        height: 20px;
        width: 80px;
        padding-top: 10px;
      }
      .cd-tabs-navigation a.selected {
        box-shadow: inset 2px 0 0 #f05451;
      }
      .cd-tabs-navigation a::before {
        top: 1px;
      }
    }
    @media only screen and (min-width: 400px;
    ) {
      .cd-tabs-navigation {
        /* tabbed on top on big devices */
        width: 400px;
           box-shadow: inset 0 -2px 3px rgba(203, 196, 130, 0.06);
      }
      .cd-tabs-navigation a {
        height: 10px;
        line-height: 10px;
        width: auto;
        text-align: left;
        font-size: 14px;
        font-size: 0.875rem;
        padding: 0 2.8em 0 4.6em;
      }
      .cd-tabs-navigation a.selected {
        box-shadow: inset 0 2px 0 #f05451;
      }
      .cd-tabs-navigation a::before {
        top: 50%;
        margin-top: -10px;
        margin-left: 0;
        left: 0px;
      }
    }
    
    
    .cd-tabs-content {
      background:
    }
    .cd-tabs-content li {
      display: none;
      padding: 1.2em;
    }
    .cd-tabs-content li.selected {
      display: block;
      -webkit-animation: cd-fade-in 0.5s;
      -moz-animation: cd-fade-in 0.5s;
      animation: cd-fade-in 0.5s;
    }
    .cd-tabs-content li p {
      font-size: 14px;
      font-size: 0.875rem;
      line-height: 0.0;
      color: #8493bf;
      margin-bottom: 2em;
    }
    @media only screen and (min-width: 400px) {
      .cd-tabs-content {
        min-height: 1px;
      }
      .cd-tabs-content li {
        padding: 0em 0em 0em 0em;
      }
    }
    @media only screen and (min-width: 400px) {
      .cd-tabs-content {
        min-height: 0;
      }
      .cd-tabs-content li {
        padding: 0em;
      }
      .cd-tabs-content li p {
        font-size: 16px;
        font-size: 1rem;
      }
    }
    
    
    @-webkit-keyframes cd-fade-in {
      0% {
        opacity: 0;
      }
      120% {
        opacity: 1;
      }
    }
    @-moz-keyframes cd-fade-in {
      0% {
        opacity: 0;
      }
      120% {
        opacity: 1;
      }
    }
    @keyframes cd-fade-in {
      0% {
        opacity: 0;
      }
      120% {
        opacity: 1;
      }
    }
    

    vi prego di darmi una mano....

    un saluto

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.