Pen Settings



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


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


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.


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.


                <!DOCTYPE html>
<html lang="es">
  <meta charset="UTF-8">
  <title>Barra de política de cookies</title>
 <!-- Contenedor principal del mensaje de uso de cookies -->
 <div class="politicas-cookie">
  <p class="info-cookie">
  Utilizo cookies personales y de terceros, al continuar navegando acepta la <a class="link-politica-cookie" href="#">política de cookies</a> de mi Blog. <a class="boton-cookie js-boton-cookie" href="javascript:void(0)">ok</a>


 position: fixed;

 display: none;
 background: #0F2027;
 background: linear-gradient(to right, #2C5364, #203A43, #0F2027);
 right: 0;
 bottom: 0;
 left: 0;
 padding:  10px;
 display: flex;
 align-items: center;
 flex-wrap: wrap;
 justify-content: center;
 color:  #fff;
 font-size: 1.2em;
 margin-bottom: 0;
 margin-top: 0;
 color: #fff;
 margin:  0 5px;
 display: flex;
 color: #fff;
 background: #FF91A6;
 border-radius: 15px;
 margin-left: 5px;
 padding: 4px 10px;
 text-decoration: none;
 transition: .5s;
 background: #F95977;


                $(document).ready(function($) {
//Evento clic de la etiqueta con la clase (.js-boton-cookie)
$('.js-boton-cookie').click(function() {
 //Almaceno los datos en localStorage (nombre, valor)
 localStorage.setItem('luismasDEV', 'Luis Rene Mas Mas');
 //Oculto la barra que muestra la información de política de cookies
 $('.politicas-cookie').css('display', 'none');
 //Muestro un mensaje en consola
 console.log('Haz aceptado nuestra política de cookies. ☺️');

//Creo la variable "dev" que almacena el valor asignado que seria (Luis Rene Mas Mas)
var dev = localStorage.getItem('luismasDEV');
//Realizo una condición si el valor obtenido de la variable "dev" es diferente (null) quiere decir que el usuario a aceptado nuestra política de cookies
if(dev != null){
 $('.politicas-cookie').css('display', 'none');
}else{//De lo contrario muestro la información
 $('.politicas-cookie').css('display', 'block');