Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Girare Ribbon menu

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2013
    Messaggi
    71

    Girare Ribbon menu

    Salve ragazzi, ho trovato questo script per un ribbon menu fantastico, purtroppo nonostante gli sforzi non sono riuscito a girarlo di 90 gradi, vorrei anche specchiare i due estremi mettendo gli spigoli in entrambi i lati, mi sapreste aiutare?

    Di seguito il codice
    codice:
    <style type="text/css">#ribbon {
      width: 180px;
      height: 280px;
      margin: 50px auto 0;
      position: relative;
      overflow: hidden;
    }
    
    
    #ribbon .inset {
      width: 200px;
      height: 55px;
      position: absolute;
      top: -50px;
      left: -10px;
      z-index: 5;
      
      -webkit-border-radius: 50%;
      -moz-border-radius: 50%;
      border-radius: 50%;
      
      background: rgba(0,0,0,0.3);
      
      box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.3);
      -moz-box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.3);
      -webkit-box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.3);
    }
    
    
    #ribbon .container {
      position: relative;
      width: 100px;
      height: 250px;
      overflow: hidden;
      margin: 0 auto;
      border-left: 1px solid #631a15;
      border-right: 1px solid #631a15;
    }
    
    
    #ribbon .base {
      height: 200px;
      width: 100px;
      
      background: rgb(199,59,60);
      background: -moz-linear-gradient(top,  rgba(199,59,60,1) 0%, rgba(184,32,31,1) 100%);
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(199,59,60,1)), color-stop(100%,rgba(184,32,31,1)));
      background: -webkit-linear-gradient(top,  rgba(199,59,60,1) 0%,rgba(184,32,31,1) 100%);
      background: -o-linear-gradient(top,  rgba(199,59,60,1) 0%,rgba(184,32,31,1) 100%);
      background: -ms-linear-gradient(top,  rgba(199,59,60,1) 0%,rgba(184,32,31,1) 100%);
      background: linear-gradient(top,  rgba(199,59,60,1) 0%,rgba(184,32,31,1) 100%);
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c73b3c', endColorstr='#b8201f',GradientType=0 );
    
    
      position: relative;
      z-index: 2;
    }
    
    
    #ribbon .base:after {
      content: '';
      position: absolute;
      top: 0;
      width: 86px;
      left: 6px;
      height: 242px;
      border-left: 1px dashed #631a15;
      border-right: 1px dashed #631a15;
    }
    
    
    #ribbon .base:before {
      content: '';
      position: absolute;
      top: 0;
      width: 86px;
      left: 7px;
      height: 242px;
      border-left: 1px dashed #da5050;
      border-right: 1px dashed #da5050;
    }
    
    
    #ribbon .left_corner {
      width: 100px;
      height: 100px;
      background: #b8201f;
      position: absolute;
      bottom: 20px;
      left: -50px;
      z-index: 1;
      
      -webkit-transform: rotate(45deg);
      -moz-transform: rotate(45deg);
      -ms-transform: rotate(45deg);
      -o-transform: rotate(45deg);
      transform: rotate(45deg);
    }
    
    
    #ribbon .right_corner {
      width: 100px;
      height: 100px;
      background: #b8201f;
      position: absolute;
      bottom: 20px;
      right: -50px;
      z-index: 1;
      
      -webkit-transform: rotate(45deg);
      -moz-transform: rotate(45deg);
      -ms-transform: rotate(45deg);
      -o-transform: rotate(45deg);
      transform: rotate(45deg);
    }
    </style>
    
    
    <html>
    <body>
    <div id="ribbon">
      
      <div class="inset"></div>
      
      <div class="container">
        <div class="base"></div>
        <div class="left_corner"></div>
        <div class="right_corner"></div>
      </div>
    
    
    </div>
    </body>
    </html>

  2. #2
    Utente di HTML.it L'avatar di Prill
    Registrato dal
    Oct 2006
    Messaggi
    2,947
    Più semplicemente potremmo avere:

    codice:
    <style type="text/css">
    
    #container  {
      position:relative;
      height: 100px;
      border-top: 1px solid #631a15;
      border-bottom: 1px solid #631a15;
       background: rgb(199,59,60);
    }
    #container:before  {
      content:"";
      height: 0px;
      width:0;
      position:absolute;
      top:0;
      left:0;
      border:50px solid #fff; /* crea il triangolino bianco a sinistra che si sovrappone allo sfondo */
      border-bottom-color:transparent;
      border-right-color:transparent;
      border-top-color:transparent;
    }
    #container:after  {
      content:"";
      height: 0;
      width:0;
      position:absolute;
      top:0;
      right:0;
      border:50px solid #fff; /* crea il triangolino bianco a destra */
      border-bottom-color:transparent;
      border-left-color:transparent;
      border-top-color:transparent;
    }
    #dotted  {
      height: 86px;
      border-top: 1px dashed #da5050;
      border-bottom: 1px dashed #da5050;
      margin-top:6px;
    }
    #content  {
      color:#fff;
      margin:0 100px;
      line-height:86px;
    }
    
    </style>
    
    
    </head>
    <body>
    <div id="container">
     <div id="dotted">
      <div id="content">quello che ti pare</div>
     </div>
    </div>
    </body>
    </html>

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.