Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!doctype html>
<html>

<head>
    <script type="text/javascript">
        var _iub = _iub || [];
        _iub.csConfiguration = {
            "lang": "it",
            "siteId": 896537, //usa il tuo siteId
            "cookiePolicyId": 8207467, //usa il tuo cookiePolicyId
            "consentOnScroll": false, //evita che il consenso venga prestato tramite lo scroll di pagina
            "banner": {
                "position": "float-top-center",
                "acceptButtonDisplay": true,
                "customizeButtonDisplay": true
            }
        };
    </script>
    <script type="text/javascript" src="//cdn.iubenda.com/cs/iubenda_cs.js" charset="UTF-8" async></script>
</head>

<body>
    <header>
        <div class="wrapper">
            <h1>iubenda Cookie Solution</h1>
            <p>Configurazione di base</p>
        </div>
    </header>

    <section class="wrapper">

        <p>Questa è una delle configurazioni più semplici della Cookie Solution: di fatto prevede tutte le impostazioni predefinite ad eccezione del consenso allo scorrimento (qui disabilitato per scopi dimostrativi).</p>

        <p>Tramite configuratore:</p>

        <img src="https://help.iubenda.com/wp-content/uploads/2019/11/cs-basic-it-codepen.png" />

        <div class="note">
            <ul>
                <li>Ricordati di usare i dati che trovi nella <a href="https://www.iubenda.com/it/dashboard" target="_blank">tua dashboard</a></li>
                <li>Si tratta di un esempio a puro scopo illustrativo, <strong>nessun consenso viene salvato</strong> (risultato di <code>_iub.csConfiguration.skipSaveConsent = true</code>). Ricarica la pagina per far riapparire il cookie banner.</li>
            </ul>
        </div>

        <h3>Blocco dei cookie</h3>

        <p>Per dimostrare il blocco dei cookie, abbiamo incorporato un video di YouTube:</p>

        <div class="embed-container" -->
            <!-- nota type="text/plain" class="_iub_cs_activate" data-suppressedsrc="..." (tagging manuale) -->
            <iframe type="text/plain" class="_iub_cs_activate" width="560" height="315" data-suppressedsrc="https://www.youtube.com/embed/DS7bqHoz8Ic" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
        </div>

        <p>E il pulsante follow di Twitter:</p>

        <!-- nota type="text/plain" class="_iub_cs_activate" data-suppressedsrc="..." (tagging manuale) -->
        <a href="https://twitter.com/iubenda" class="twitter-follow-button" data-show-count="true" data-size="large">Follow @iubenda</a>
        <script async type="text/plain" class="_iub_cs_activate" data-suppressedsrc="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

        <p>Entrambi gli script sono bloccati tramite tagging manuale, uno dei <a href="https://www.iubenda.com/it/help/1627" target="_blank">metodi previsti</a> dalla Cookie Solution. Fai click sul pulsante <strong>Accetta</strong> per prestare il consenso e rilasciare gli script (ricaricando la pagina tornerai alla situazione iniziale).</p>

        <hr />

        <h4>Guide utili</h4>
        <ul class="guides">
            <li><a href="https://www.iubenda.com/it/help/680" target="_blank">Introduzione alla iubenda Cookie Solution</a></li>
            <li><a href="https://www.iubenda.com/it/help/1696" target="_blank">Come personalizzare il cookie banner (guida di base)</a></li>
            <li><a href="https://www.iubenda.com/it/help/623" target="_blank">Come configurare la Cookie Solution (guida avanzata)</a></li>
            <li><a href="https://www.iubenda.com/it/help/1627" target="_blank">Introduzione al blocco preventivo dei cookie</a></li>
        </ul>

    </section>
</body>

</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                //non copiare questo JS (solo per scopi dimostrativi)

_iub.csConfiguration.skipSaveConsent = true; //non salvare il consenso, mostra sempre il banner
              
            
!
999px

Console