{"id":175,"date":"2023-01-02T13:48:28","date_gmt":"2023-01-02T13:48:28","guid":{"rendered":"https:\/\/blog.hostinger.io\/es\/support\/2023\/01\/02\/6511583-hostinger-creador-de-sitios-web-como-anadir-un-banner\/"},"modified":"2025-08-26T20:52:13","modified_gmt":"2025-08-26T20:52:13","slug":"6511583-hostinger-creador-de-sitios-web-como-anadir-un-banner","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/es\/support\/6511583-hostinger-creador-de-sitios-web-como-anadir-un-banner\/","title":{"rendered":"Hostinger Creador de Sitios Web: C\u00f3mo A\u00f1adir un Banner"},"content":{"rendered":"<p class=\"no-margin\">Con la ayuda de c&oacute;digo personalizado, puede a&ntilde;adir varios banners a su sitio web.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Estos banners no ser&aacute;n visibles en el editor, pero s&iacute; en la vista previa y en el sitio web activo &#128161; <\/p>\n<\/div><p class=\"no-margin\">\n<\/p><h1 id=\"h_1a3807e1c0\">Banner con texto est&aacute;tico encima del men&uacute; de navegaci&oacute;n<\/h1><p class=\"no-margin\">Este banner tiene el siguiente aspecto:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/es\/support\/wp-content\/uploads\/sites\/60\/2023\/01\/8cb680bd-5bc7-492d-8401-d6b8799c302f.jpg\" alt=\"Un banner con texto est&aacute;tico encima del men&uacute; de navegaci&oacute;n del sitio web\"><\/div><p class=\"no-margin\">Copie el c&oacute;digo siguiente y p&eacute;guelo en el campo <b><a href=\"\/es\/support\/6445594-creador-de-sitios-web-como-anadir-un-codigo-personalizado-a-la-parte-head-head-del-codigo-de-un-sitio-web\" target=\"_blank\" class=\"intercom-content-link\">C&oacute;digo personalizado<\/a><\/b> de la <b>configuraci&oacute;n de integraciones<\/b> de su sitio web.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\"><b>NOTAS<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\">Sustituye la frase <b><i>This is the text inside the banner<\/i><\/b> por tu propio texto antes de guardar los cambios<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Si sabes <b><a href=\"https:\/\/www.w3schools.com\/css\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">CSS<\/a><\/b>, tambi&eacute;n puedes personalizar el tama&ntilde;o y los colores del banner editando atributos espec&iacute;ficos<\/p>\n<\/li>\n<\/ul><pre><code>&lt;script&gt;<br>    const bannerText = 'This is the text inside the banner';<br>    const topBanner = document.createElement('div');<br><br>    topBanner.id = 'bannerTop';<br>    topBanner.insertAdjacentHTML(\"afterbegin\", `&lt;p&gt;${bannerText}&lt;\/p&gt;`);<br><br>    setTimeout(() =&gt; {<br>        requestAnimationFrame(() =&gt; {<br>            document.body.append(topBanner);<br>        })<br><br>        setTimeout(() =&gt; {<br>            requestAnimationFrame(() =&gt; {<br>                topBanner.classList.add('visible');<br>            })<br>        }, 50);<br>    }, 1500);<br>&lt;\/script&gt;<br><br>&lt;style&gt;<br>    header {<br>        animation-delay: 1.5s;<br>        animation-duration: .4s;<br>        animation-iteration-count: 1;<br>        animation-fill-mode: forwards;<br>        animation-timing-function: ease;<br>        animation-name: addPadding;<br>    }<br><br>    @keyframes addPadding {<br>        to {<br>            padding-top: 4.9vh;<br>        }<br>    }<br><br>    #bannerTop {<br>        z-index: 20;<br>        position: fixed;<br>        top: 0;<br>        width: 100%;<br>        height: 5vh;<br>        display: flex;<br>        justify-content: center;<br>        align-items: center;<br>        background-color: #CF8D6D;<br>        overflow: hidden;<br>        opacity: 0;<br>        transform: translateY(-100%);<br>        transition: all .3s ease;<br>    }<br><br>    #bannerTop.visible {<br>        opacity: 1;<br>        transform: translateY(0);<br>    }<br><br>    #bannerTop p {<br>        color: #fff;<br>    }<br><br>    @media screen and (max-width: 920px) {<br>        #bannerTop {<br>            height: 10vh;<br>            flex-direction: column;<br>        }<br><br>        @keyframes addPadding {<br>            to {<br>                padding-top: 9.9vh;<br>            }<br>        }<br>    }<br>&lt;\/style&gt;<\/code><\/pre><p class=\"no-margin\">\n<\/p><h1 id=\"h_4b44d39ad5\">Banner con texto corrido encima del men&uacute; de navegaci&oacute;n<\/h1><p class=\"no-margin\">Este banner tiene el siguiente aspecto:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/es\/support\/wp-content\/uploads\/sites\/60\/2023\/01\/eeadf45d-b074-4647-991d-fafc6fc8f6ce.jpg\" alt=\"Un banner con texto est&aacute;tico en la parte inferior de un sitio web\"><\/div><p class=\"no-margin\">Copie el c&oacute;digo siguiente y p&eacute;guelo en el campo <b><a href=\"\/es\/support\/6445594-creador-de-sitios-web-como-anadir-un-codigo-personalizado-a-la-parte-head-head-del-codigo-de-un-sitio-web\" target=\"_blank\" class=\"intercom-content-link\">C&oacute;digo personalizado<\/a><\/b> de la <b>configuraci&oacute;n de integraciones<\/b> de su sitio web. <\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\"><b>NOTAS<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\">Sustituye las frases <b><i>This is the first text<\/i><\/b> y <b><i>This is the first text<\/i><\/b> por tu propio texto antes de guardar los cambios<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Si sabes <b><a href=\"https:\/\/www.w3schools.com\/css\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">CSS<\/a><\/b>, tambi&eacute;n puedes personalizar el tama&ntilde;o y los colores del banner editando atributos espec&iacute;ficos<\/p>\n<\/li>\n<\/ul><pre><code>&lt;script&gt;<br>    const bannerTextOne = 'This is the first text';<br>    const bannerTextTwo = 'This is the second text';<br>    const topMovingBanner =  document.createElement('div');<br><br>    topMovingBanner.id = 'movingBannerTop';<br>    topMovingBanner.insertAdjacentHTML(\"afterbegin\", `&lt;p id=\"bannerTextOne\"&gt;${bannerTextOne}&lt;\/p&gt;&lt;p id=\"bannerTextTwo\"&gt;${bannerTextTwo}&lt;\/p&gt;`);<br><br>    setTimeout(() =&gt; {<br>        requestAnimationFrame(() =&gt; {<br>            document.body.append(topMovingBanner);<br>        })<br>        setTimeout(() =&gt; {<br>            requestAnimationFrame(() =&gt; {<br>                topMovingBanner.classList.add('visible');<br>            });<br>        }, 50);<br>    }, 1500);<br>&lt;\/script&gt;<br><br>&lt;style&gt;<br>    header {<br>        animation-delay: 1.5s;<br>        animation-duration: .4s;<br>        animation-iteration-count: 1;<br>        animation-fill-mode: forwards;<br>        animation-timing-function: ease;<br>        animation-name: addPadding;<br>    }<br><br>    @keyframes addPadding {<br>        to {<br>            padding-top: 4.9vh;<br>        }<br>    }<br><br>    #movingBannerTop {<br>        z-index: 20;<br>        position: fixed;<br>        top: 0;<br>        width: 100%;<br>        height: 5vh;<br>        background-color: #CF8D6D;<br>        overflow: hidden;<br>        display: flex;<br>        align-items: center;<br>        opacity: 0;<br>        transform: translateY(-100%);<br>        transition: all .3s ease;<br>    }<br><br>    #movingBannerTop.visible {<br>        opacity: 1;<br>        transform: translateY(0);<br>    }<br><br>    #movingBannerTop p {<br>        color: #fff;<br>        display: inline-block;<br>        white-space: nowrap;<br>        padding-left: 100%;<br>        position: absolute;<br>    }<br><br>    #bannerTextOne {<br>        animation: bannerAnimationOne 20s linear infinite;<br>    }<br><br>    #bannerTextTwo {<br>        animation: bannerAnimatioTwo 20s linear infinite;<br>    }<br><br>    @keyframes bannerAnimationOne {<br>        0% {<br>            transform: translateX(0);<br>            visibility: visible;<br>        }<br><br>        50% {<br>            transform: translateX(-100%);<br>            visibility: hidden;<br>        }<br><br>        100% {<br>            transform: translateX(-100%);<br>            visibility: hidden;<br>        }<br>    }<br><br>    @keyframes bannerAnimatioTwo {<br>        0% {<br>            transform: translateX(0);<br>            visibility: hidden;<br>        }<br><br>        50% {<br>            transform: translateX(0);<br>            visibility: visible;<br>        }<br><br>        100% {<br>            transform: translateX(-100%);<br>            visibility: visible;<br>        }<br>    }<br><br>    @media screen and (max-width: 920px) {<br>        @keyframes addPadding {<br>            to {<br>                padding-top: 9.9vh;<br>            }<br>        }<br><br>        #movingBannerTop {<br>            height: 10vh;<br>        }<br><br>        #bannerTextOne {<br>            animation: bannerAnimationOne 15s linear infinite;<br>        }<br><br>        #bannerTextTwo {<br>            animation: bannerAnimatioTwo 15s linear infinite;<br>        }<br>    }<br>&lt;\/style&gt;<\/code><\/pre><p class=\"no-margin\">\n<\/p><h1 id=\"h_a851bcfa01\">Banner con texto est&aacute;tico en la parte inferior del sitio web<\/h1><p class=\"no-margin\">Este banner tiene el siguiente aspecto:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/es\/support\/wp-content\/uploads\/sites\/60\/2023\/01\/c114f010-1289-40c4-8f39-4240cec29dd7.jpg\" alt=\"Un banner con texto est&aacute;tico en la parte inferior de un sitio web\"><\/div><p class=\"no-margin\">Copie el c&oacute;digo siguiente y p&eacute;guelo en el campo <b><a href=\"\/es\/support\/6445594-creador-de-sitios-web-como-anadir-un-codigo-personalizado-a-la-parte-head-head-del-codigo-de-un-sitio-web\" target=\"_blank\" class=\"intercom-content-link\">C&oacute;digo personalizado<\/a><\/b> de la <b>configuraci&oacute;n de integraciones<\/b> de su sitio web. <\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\"><b>NOTAS<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\">Sustituye la frase <b><i>This is the text inside the banner<\/i><\/b> por tu propio texto antes de guardar los cambios<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Si sabes <b><a href=\"https:\/\/www.w3schools.com\/css\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">CSS<\/a><\/b>, tambi&eacute;n puedes personalizar el tama&ntilde;o y los colores del banner editando atributos espec&iacute;ficos<\/p>\n<\/li>\n<\/ul><pre><code>&lt;script&gt;<br>    const bannerText = 'This is the text inside the banner';<br>    const bannerBottom = document.createElement('div');<br>    const bannerCloseButton = document.createElement('span');<br><br>    bannerBottom.id = 'bottomBanner';<br>    bannerBottom.append(bannerCloseButton);<br>    bannerBottom.insertAdjacentHTML(\"beforeend\", `&lt;p&gt;${bannerText}&lt;\/p&gt;`);<br><br>    bannerCloseButton.addEventListener('click', () =&gt; {<br>        bannerBottom.style.display = 'none';<br>    })<br><br>    setInterval(() =&gt; {<br>        if (!document.querySelector('#bottomBanner')) {<br>            document.querySelector('main').append(bannerBottom);<br>        }<br>    });<br>&lt;\/script&gt;<br><br>&lt;style&gt;<br>    #bottomBanner {<br>        background-color: rgba(255, 0, 0, 0.7);<br>        position: fixed;<br>        bottom: 0;<br>        display: flex;<br>        justify-content: center;<br>        align-items: center;<br>        width: 100%;<br>        height: 5vh;<br>        z-index: 15;<br>    }<br><br>    #bottomBanner p {<br>        color: #000;<br>    }<br><br>    #bottomBanner span {<br>        position: absolute;<br>        top: 50%;<br>        transform: translateY(-50%);<br>        left: 1rem;<br>        width: 30px;<br>        height: 30px;<br>        cursor: pointer;<br>        transition: .2s;<br>    }<br><br>    #bottomBanner span:hover {<br>        background-color: #fff3;<br>    }<br><br>    #bottomBanner span:before {<br>        transform: rotate(315deg);<br>    }<br><br>    #bottomBanner span:after {<br>        transform: rotate(45deg);<br>    }<br><br>    #bottomBanner span:before,<br>    #bottomBanner span:after {<br>        background-color: #000;<br>        position: absolute;<br>        top: 14px;<br>        left: 6px;<br>        width: 20px;<br>        height: 2px;<br>        content: '';<br>        border-radius: 2px;<br>    }<br><br>    @media screen and (max-width: 920px) {<br>        #bottomBanner {<br>            height: 10vh;<br><br>        }<br>    }<br>&lt;\/style&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A\u00f1adir un banner a un sitio web<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[260],"tags":[],"class_list":["post-175","post","type-post","status-publish","format-standard","hentry","category-integraciones"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/6511583-hostinger-website-builder-how-to-add-a-sticky-bar\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/6511583-hostinger-creador-de-sitios-web-como-anadir-un-banner\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/6511583-hostinger-createur-de-site-web-comment-ajouter-une-banniere\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/6511583-hostinger-website-builder-cara-menambahkan-banner\/","default":0},{"locale":"lt-LT","link":"https:\/\/www.hostinger.com\/lt\/support\/6511583-hostinger-svetainiu-kurimo-irankis-kaip-prideti-reklamjuoste\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/br\/support\/6511583-hostinger-criador-de-sites-como-adicionar-um-banner\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/posts\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"predecessor-version":[{"id":1365,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/posts\/175\/revisions\/1365"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/es\/support\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}