<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Popover on Commentary of Takao</title><link>https://takao.blog/es/tags/popover/</link><description>Recent content in Popover on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>es</language><copyright>Commentary of Takao</copyright><lastBuildDate>Sun, 12 Jul 2026 04:12:51 +0900</lastBuildDate><atom:link href="https://takao.blog/es/tags/popover/index.xml" rel="self" type="application/rss+xml"/><item><title>CSS Popover API: Superposiciones nativas sin JavaScript</title><link>https://takao.blog/es/web/css-popover-api/</link><pubDate>Tue, 20 Aug 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/es/web/css-popover-api/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-popover-api-es.png" alt="Featured image of post CSS Popover API: Superposiciones nativas sin JavaScript" /&gt;&lt;h2 id="introducción"&gt;Introducción
&lt;/h2&gt;&lt;p&gt;Construir tooltips, menús y modales requería JavaScript. La CSS Popover API proporciona una forma declarativa nativa con manejo de posición, toggle, foco y cierre.&lt;/p&gt;
&lt;h2 id="atributos-básicos"&gt;Atributos básicos
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;popover&lt;/code&gt; marca un elemento como superposición. &lt;code&gt;popovertarget&lt;/code&gt; vincula un botón al popover. Modos: &lt;code&gt;auto&lt;/code&gt; (cierre al hacer clic fuera o Escape) y &lt;code&gt;manual&lt;/code&gt; (cierre programático).&lt;/p&gt;
&lt;h2 id="api-toggle"&gt;API Toggle
&lt;/h2&gt;&lt;p&gt;Métodos: &lt;code&gt;showPopover()&lt;/code&gt;, &lt;code&gt;hidePopover()&lt;/code&gt;, &lt;code&gt;togglePopover()&lt;/code&gt;. Eventos: &lt;code&gt;beforetoggle&lt;/code&gt; y &lt;code&gt;toggle&lt;/code&gt; con &lt;code&gt;oldState&lt;/code&gt; y &lt;code&gt;newState&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="light-dismiss"&gt;Light dismiss
&lt;/h2&gt;&lt;p&gt;Los popovers auto se cierran al hacer clic fuera, presionar Escape o abrir otro popover.&lt;/p&gt;</description></item></channel></rss>