运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往空间
<!DOCTYPE html> <html> <body> <style> #mydiv { text-align:center; padding:40px; background-color:lightblue; font-family:"Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } </style> <h1>The popover Attribute</h1> <div popover id="mydiv"> <h2>Popover</h2> <hr> <p>A popover is an element that is placed on top of everything else.</p> <p>It can be used when you want to tell something important.</p> <button popovertarget="mydiv" popovertargetaction="hide">Close</button> </div> <button popovertarget="mydiv">Click me!</button> <p>You can style popover elements with CSS.</p> <p>Click the button to show the popover element.</p> </body> </html>